[Filterscript] Need /goto toogle
#5

pawn Код:
new gotost[MAX_PLAYERS];

public OnPlayerConnect(playerid) {
    gotost[playerid] = 0; // 0 by default
    return 1;
}

CMD:togglegoto(playerid, params[]) {
    if(gotost[playerid] == 1) {
        SendClientMessage(playerid, -1, "Players can no longer teleport to you.");
        gotost[playerid] = 0;
    }
    else {
        SendClientMessage(playerid, -1, "Players can now teleport to you.");
        gotost[playerid] = 1;
    }
    return 1;
}
And in the goto command, add:

pawn Код:
if(gotost[id] == 1) {
    // teleport code
}
else SendClientMessage(playerid, -1, "You cannot teleport to this player.");
Reply


Messages In This Thread
[Filterscript] Need /goto toogle - by ixesas - 13.01.2012, 21:06
Re: [Filterscript] Need /goto toogle - by Snowman12 - 13.01.2012, 21:19
Re: [Filterscript] Need /goto toogle - by ixesas - 13.01.2012, 21:20
Re: [Filterscript] Need /goto toogle - by Soumi - 13.01.2012, 21:30
Re: [Filterscript] Need /goto toogle - by Mean - 13.01.2012, 21:43
Re: [Filterscript] Need /goto toogle - by ixesas - 14.01.2012, 12:11
Re: [Filterscript] Need /goto toogle - by Mean - 14.01.2012, 12:21
Re: [Filterscript] Need /goto toogle - by ixesas - 14.01.2012, 12:28
Re: [Filterscript] Need /goto toogle - by Mean - 14.01.2012, 12:31
Re: [Filterscript] Need /goto toogle - by ixesas - 14.01.2012, 12:45

Forum Jump:


Users browsing this thread: 1 Guest(s)