Move cmd help
#4

pawn Код:
if(strcmp(cmd, "/up", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /up [amount]");
                return 1;
            }
            new pos;
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            pos = strval(tmp);
            new Float:X, Float:Y, Float:Z;
            new vehicleid = GetPlayerVehicleID(playerid);
            GetPlayerPos(playerid, X, Y, Z);
            if(IsPlayerInAnyVehicle(playerid))
           {
            SetVehiclePos(vehicleid, X, Y, Z+pos);
            SendClientMessage(playerid,COL_ADMIN,"** Moved up 50 feet.");
            }
            else
            {
            SetPlayerPos(vehicleid, X, Y, Z+pos);
            SendClientMessage(playerid,COL_ADMIN,"** Moved up 50 feet.");
            return 1;
            }
        }
        else
        {
         SendClientMessage(playerid,COLOR_GRAD3,"You are not authorised to use this command.!");
         return 1;
        }
    }
strcmp command by me the way you want. U can change it to zcmd if you want!
Reply


Messages In This Thread
Move cmd help - by SnG.Scot_MisCuDI - 25.12.2011, 03:25
Re: Move cmd help - by §с†¶e®РµРe - 25.12.2011, 04:09
Re: Move cmd help - by SnG.Scot_MisCuDI - 25.12.2011, 04:10
Re: Move cmd help - by Ballu Miaa - 25.12.2011, 05:07
Re: Move cmd help - by SnG.Scot_MisCuDI - 25.12.2011, 05:26
Re: Move cmd help - by Ballu Miaa - 25.12.2011, 12:43
Re: Move cmd help - by rinori - 25.12.2011, 13:39

Forum Jump:


Users browsing this thread: 3 Guest(s)