Floats in a parameter-cmd
#2

Made it quickly and havent tested it but it should work:

pawn Код:
COMMAND:gotopos(playerid, params[])
{
    new Float:PosX,Float:PosY,Float:PosZ;
    if(!sscanf(params, "fff",PosX,PosY,PosZ))
    {
        SetPlayerPos(playerid, PosX,PosY,PosZ);
        SendClientMessage(playerid, 0xFFFFFFFF, "You have been teleported to your desired pos.");
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF,"Usage: /gotopos [X][Y][Z]");
    return 1;
}
Reply


Messages In This Thread
Floats in a parameter-cmd - by XCarBOn - 17.01.2011, 20:48
Re: Floats in a parameter-cmd - by Alex_Valde - 17.01.2011, 21:13
Re: Floats in a parameter-cmd - by XCarBOn - 18.01.2011, 16:48
Re: Floats in a parameter-cmd - by HyperZ - 18.01.2011, 16:56
Re: Floats in a parameter-cmd - by XCarBOn - 18.01.2011, 17:29

Forum Jump:


Users browsing this thread: 2 Guest(s)