05.10.2010, 00:12
(
Последний раз редактировалось TheChaoz; 05.10.2010 в 22:14.
)
you can do that by using an array,
Sorry for my english but i'm from argentina.
pawn Код:
new bool:cgoto[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[]){
if(!strcmp(cmdtext, "/enablegotome", true)){
if(cgoto[playerid])return SendClientMessage(playerid, 0xFFFF00FF, "Server: You have already allow other players goto tou.");
cgoto[playerid] = true;
return SendClientMessage(playerid, 0x00FF00FF, "Server: You have allowed other players goto you");
}
if(!strcmp(cmdtext, "/disablegotome", true)){
if(!cgoto[playerid])return SendClientMessage(playerid, 0xFFFF00FF, "Server: You have already forbid other players goto you");
cgoto[playerid] = false;
return SendClientMessage(playerid, 0xFF0000FF, "Server: You have forbid other players goto you");
}
if(!scrcmp(cmdtext, "/goto", true)){
//code
if(!cgoto[gotoid])return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This players don0t admit other players to teleport to him");
//teleport the player to the gotoidplayer
//gotoid = the player that the playerid want to teleport to.
}
return 0;
}