#1

How can i nake a cmd like /up [height]
When u type for example /up 99 it takes u up to that height
And i want it as maximum height for 999999
[reps]
Reply
#2

pawn Код:
CMD:up(playerid,params[])
{
    if(isnull(params)) return SendClientMessage(playerid, RED, "/up [height]");
    else
    {
        if(strval(params) > 999999) return SendClientMessage(playerid, -1, "Can't go higher than 999999.");
        new Float:oX, Float:oY, Float:oZ;
        GetPlayerPos(playerid, oX, oY, oZ);
        SetPlayerPos(playerid, oX, oY, oZ+strval(params));
    }
    return 1;
}
Reply
#3

like this
pawn Код:
CMD:up(playerid,parmas[])
{
new hi;
if(sscanf(parmas,"i",hi))return SendClinetMessage(playerid,-1,"{ff0000}wrong usage do /up height");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,hi);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)