07.06.2015, 21:10
Why would you need to make a switch? If you mean a /goto off for the "giveplayerid":
towards the top ^^
then, below the sscanf line
then something such as:
pawn Код:
new bool: Goto[MAX_PLAYERS][MAX_PLAYERS];
then, below the sscanf line
pawn Код:
if(Goto[giveplayerid][playerid] == true) return SendClientMessage(playerid, -1, "That player has disabled you from using /goto to TP to them!");
pawn Код:
CMD:disablegoto(playerid, params[])
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "USAGE: /disablegoto [playerid]");
if(Goto[playerid][giveplayerid] == true)
{
Goto[playerid][giveplayerid] = false;
SendClientMessage(playerid, -1, "That player can now TP to you again.");
}
else {
Goto[playerid][giveplayerid] = true;
SendClientMessage(playerid, -1, "That player can no longer TP to you.");
}
return 1;
}