How to make a /gotoxyz Command ?
#9

Quote:
Originally Posted by LeroyII
Посмотреть сообщение
Try this one:
pawn Код:
CMD:gotoxyz(playerid,params[]) {
    if (PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pHelper] >= 4)
        new Float:x, Float:y, Float:z;
        new tmp[128], tmp2[128], tmp3[128];
        new string[128], Index; tmp = strtok(params,Index); tmp2 = strtok(params,Index); tmp3 = strtok(params,Index);
        if(isnull(tmp) || isnull(tmp2) || isnull(tmp3)) return SendClientMessage(playerid,red,"USAGE: /gotoxyz [X],[Y],[Z]");
        x = strval(tmp);        y = strval(tmp2);       z = strval(tmp3);
        if(GetPlayerState(playerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
        else SetPlayerPos(playerid,x,y,z);
        format(string,sizeof(string),"You have teleported to %f, %f, %f", x,y,z); return SendClientMessage(playerid,blue,string);
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Btw. Pawnify your command is for rcon admins!
Yeah I was giving an example, I also said edit to your likings for admin level.

Glad the problem was resolved!
Reply


Messages In This Thread
How to make a /gotoxyz Command ? - by EgyptForLife - 03.09.2014, 17:26
Re: How to make a /gotoxyz Command ? - by Pawnify - 03.09.2014, 17:46
Re: How to make a /gotoxyz Command ? - by Fred1993 - 03.09.2014, 18:20
Re: How to make a /gotoxyz Command ? - by LeroyII - 03.09.2014, 18:36
Re: How to make a /gotoxyz Command ? - by EgyptForLife - 03.09.2014, 18:37
Re: How to make a /gotoxyz Command ? - by Fred1993 - 03.09.2014, 18:47
Re: How to make a /gotoxyz Command ? - by EgyptForLife - 03.09.2014, 19:38
Re: How to make a /gotoxyz Command ? - by Fred1993 - 03.09.2014, 19:50
Re: How to make a /gotoxyz Command ? - by Pawnify - 03.09.2014, 21:36
Re: How to make a /gotoxyz Command ? - by LeroyII - 03.09.2014, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)