Created Commands not working
#3

PHP код:
CMD:plus(playerid,params[])
{
    if(
PlayerInfo[playerid][aLevel] < 1) return SendClientMessage(playerid,RED,"Only admin level 1+ can use this command.");
    if(
HasSpawned{playerid} == false) return SendClientMessage(playeridRED"You must be spawned before you can use this command.");
    if(
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridRED"You cant use this command in a vehicle.");
    new 
coordinate[150], Float:distanceFloat:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    if(
sscanf(params"s[150]f"coordinatedistance)) return SendClientMessage(playeridRED"[USAGE]: /plus [x/y/z] [distance]");
    if(
strfind(coordinate"x"false) != -1)
    {
        
SetPlayerPos(playeriddistanceyz);
    }
    else if(
strfind(coordinate"y"false) != -1)
    {
        
SetPlayerPos(playeridxdistancez);
    }
    else if(
strfind(coordinate"z"false) != -1)
    {
        
SetPlayerPos(playeridxydistance);
    }
    else
    {
        
SendClientMessage(playeridRED"The coord can only be x, y or z.");
    }
    return 
true;

This command makes you move your position
Reply


Messages In This Thread
Created Commands not working - by ThatThoseTheThy - 28.03.2015, 12:05
Re: Created Commands not working - by Oeal - 28.03.2015, 12:27
Re: Created Commands not working - by ThatThoseTheThy - 28.03.2015, 13:38
Re: Created Commands not working - by CrossOv3r - 28.03.2015, 13:42
Re: Created Commands not working - by ThatThoseTheThy - 28.03.2015, 13:46
Re: Created Commands not working - by maximthepain - 28.03.2015, 13:50
Re: Created Commands not working - by CrossOv3r - 28.03.2015, 13:51
Re: Created Commands not working - by ThatThoseTheThy - 28.03.2015, 14:00

Forum Jump:


Users browsing this thread: 4 Guest(s)