Cuff/Uncuff
#7

I'd suggest you moving to dcmd to make commands with parameters.
But if you insist:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new tmp[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp("/cuff", cmd, true) == 0)
    {
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp)) return SendClientMessage(playerid,0xFF0000FF,"USAGE: /cuff [playerid]");
        if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid,0xFF0000FF,"Player is not connected");

        TogglePlayerControllable(strval(tmp),0);
        GameTextForPlayer(strval(tmp), "~y~ hand cuffs!",2500,3);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Cuff/Uncuff - by striker25 - 16.07.2010, 18:56
Re: Cuff/Uncuff - by KennethRandall - 16.07.2010, 21:12
Re: Cuff/Uncuff - by striker25 - 16.07.2010, 21:45
Re: Cuff/Uncuff - by [NTX]MikeQ - 16.07.2010, 21:46
Re: Cuff/Uncuff - by striker25 - 16.07.2010, 21:50
Re: Cuff/Uncuff - by Hamza' - 16.07.2010, 22:06
Re: Cuff/Uncuff - by [XST]O_x - 16.07.2010, 22:07
Re: Cuff/Uncuff - by striker25 - 16.07.2010, 22:22
Re: Cuff/Uncuff - by Hamza' - 16.07.2010, 22:29
Re: Cuff/Uncuff - by Hamza' - 16.07.2010, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)