Disable player goto you
#2

you can do that by using an array,
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;
}
Sorry for my english but i'm from argentina.
Reply


Messages In This Thread
Disable player goto you - by audifan00 - 04.10.2010, 22:44
Re: Disable player goto you - by TheChaoz - 05.10.2010, 00:12
Re: Disable player goto you - by samgreen - 05.10.2010, 02:52
Re: Disable player goto you - by Caine Toth - 05.10.2010, 03:37
Re: Disable player goto you - by samgreen - 05.10.2010, 08:25
Re: Disable player goto you - by audifan00 - 05.10.2010, 19:20

Forum Jump:


Users browsing this thread: 1 Guest(s)