View Single Post
Old 16/10/2019, 03:41 PM   #6
DomagojSellug
Huge Clucker
 
DomagojSellug's Avatar
 
Join Date: Sep 2016
Location: Croatia
Posts: 239
Reputation: 22
Default Re: I need help with a /blindfold command!

Quote:
Originally Posted by PopularTech View Post
Both of theese are cool ideas but they seem impossible for me to do alone. Thanks a lot ill find someone to help me now
They are not really impossible. This is the simpler solution with the camera position set:

pawn Code:
new blindfolded[MAX_PLAYERS];

CMD:blindfold(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return 0; // if you did not enter an ID the command won't work, instead of return you can put your own error message or something
    if(blindfolded[id] == 1) // if the target is blindfolded
    {
        SetCameraBehindPlayer(id); // camera resets
        TogglePlayerControllable(id, 1); // player can move again
        blindfolded[id] = 0;
    }
    else
    {
        blindfolded[id] = 1;
        SetCameraPos(id, 0,0,0); // you can add your own coordinates instead of 0,0,0
        TogglePlayerControllable(id, 0); // player is frozen
    }
}
__________________

San Andreas Multiplayer server based off Counter Strike: Global Offensive.

Join us today!

DISCORD: discord.sa-go.info
WEBSITE: http://sa-go.info
SERVER IP: samp.sa-go.info
DomagojSellug is offline   Reply With Quote