Help with changegravity cmd.
#1

PHP код:
CMD:changegravity(playerid,params[]){
    new 
gravity SetGravity(gravity), string[128];
    if(
PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid,COLOR_GRAY,"Error: You're not on admin duty!");
    else if(
PlayerInfo[playerid][pAdmin] < 4) return AdminRefuse(playerid);
    else if(
sscanf(params,"d",gravity)) return SendClientMessage(playerid,COLOR_GRAY,"Syntax: /changegravity [gravity]");
    else
    {
        
format(string,sizeof(string),"Admin %s has set the gravity to %d",GetName(playerid),gravity);
        
SendClientMessageToAll(COLOR_YELLOW,string);
    }
    return 
1;

Thats my command, but I cant put numbers like 000.8 because it gives me the error, /changegravity [gravity]
But if I do /changegravity 1 it works fine..
Reply


Messages In This Thread
Help with changegravity cmd. - by Azzeto - 18.10.2011, 18:25
Re: Help with changegravity cmd. - by Wesley221 - 18.10.2011, 18:55
Re: Help with changegravity cmd. - by Azzeto - 18.10.2011, 19:02
Re: Help with changegravity cmd. - by Gustavob - 18.10.2011, 19:02
Re: Help with changegravity cmd. - by Azzeto - 18.10.2011, 19:05
Re: Help with changegravity cmd. - by Azzeto - 18.10.2011, 19:08
Re: Help with changegravity cmd. - by Gustavob - 18.10.2011, 19:09
Re: Help with changegravity cmd. - by Drebin - 18.10.2011, 19:10
Re: Help with changegravity cmd. - by Azzeto - 18.10.2011, 19:16

Forum Jump:


Users browsing this thread: 3 Guest(s)