Need a Command "/gotopos" or "/setpos"
#3

I dont have COMMAND: gotopos and stuff so i guess that should be this:

Код:
	if (strcmp(cmd, "/gotopos", true) == 0)
	{
    new Float:PosX, Float:PosY, Float:PosZ;
    if(sscanf(params, "fff", PosX, PosY, PosZ)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /gotopos x, y, z");
    else if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            DOO_SetVehiclePos(GetPlayerVehicleID(playerid), PosX, PosY, PosZ);
        }
        else
        {
            DOO_SetPlayerPos(playerid, PosX, PosY, PosZ);
        }
        SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported !");
        SetPlayerInterior(playerid,0);
        PlayerInfo[playerid][pInt] = 0;
    }
    return 1;
}
But it gives an error, Saying that sscanf = Nothing


I dont know how this works, But you need o exchange the COMMAND: stuff to:

Код:
if(strcmp(cmd, "/gotopos", true) == 0)
Reply


Messages In This Thread
Need a Command "/gotopos" or "/setpos" - by up2u - 11.05.2011, 13:40
Re: Need a Command "/gotopos" or "/setpos" - by Laronic - 11.05.2011, 13:55
Re: Need a Command "/gotopos" or "/setpos" - by up2u - 11.05.2011, 14:07
Re: Need a Command "/gotopos" or "/setpos" - by Sasino97 - 11.05.2011, 14:14
Re: Need a Command "/gotopos" or "/setpos" - by up2u - 11.05.2011, 14:17
Re: Need a Command "/gotopos" or "/setpos" - by Laronic - 11.05.2011, 14:18
Re: Need a Command "/gotopos" or "/setpos" - by up2u - 11.05.2011, 14:20
Re: Need a Command "/gotopos" or "/setpos" - by Sasino97 - 11.05.2011, 14:20
Re: Need a Command "/gotopos" or "/setpos" - by up2u - 11.05.2011, 14:24
Re: Need a Command "/gotopos" or "/setpos" - by Sasino97 - 11.05.2011, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)