/ta command [SIMPLE]
#3

here you got:

pawn Код:
new IsCop[MAX_PLAYERS];
CMD:ta(playerid, params[])
{
    new string[128];
    if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "/ta [playerid]");
    if(!IsPlayerConnected(params[0]))return SendClientMessage(playerid, COLOR_WHITE, "Error: This player is not connected!");
    if(params[0] == playerid) return SendClientMessage(playerid,COLOR_WHITE,"Error: You cannot taze yourself!");
    if(IsCop[playerid] == 1)
    {
        TogglePlayerControllable(params[0], 0);
        format(string, sizeof(string), "{FF0000}TAZED: You have been tazed by cop %s for 2.5", GetName(playerid));
        SendClientMessage(params[0], -1, string);
        GameTextForPlayer(params[0], "~r~TAZED", 5000, 4);
        format(string, sizeof(string), "TAZED: You have tazed the player %s for 2.5 seconds", GetName(params[0]));
        SendClientMessage(playerid, COLOR_BLUE, string); //HERE
        SetTimer("TazedPlayer", 25000, false);
    }
    else
    {
        SendClientMessage(playerid, -1, "{FF0000}ERROR: You are not a cop, you are not allowed to use this command");
    }
    return 1;
}

forward TazedPlayer(playerid);
public TazedPlayer(playerid)
{
    TogglePlayerControllable(playerid, 1); // AND HERE SPECCIALY
    GameTextForPlayer(playerid, "~r~UNTAZED", 5000, 4);
    return 1;
}
Reply


Messages In This Thread
/ta command [SIMPLE] - by PabloDiCostanzo - 18.10.2013, 22:41
Re: /ta command [SIMPLE] - by bensmart469 - 18.10.2013, 23:36
Re: /ta command [SIMPLE] - by AnonScripter - 18.10.2013, 23:37

Forum Jump:


Users browsing this thread: 1 Guest(s)