Help with changegravity cmd.
#7

Silly me.
pawn Код:
CMD:changegravity(playerid,params[]){
    new Float: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,"f",gravity)) return SendClientMessage(playerid,COLOR_GRAY,"Syntax: /changegravity [gravity]");
    else
    {
        format(string,sizeof(string),"Admin %s has set the gravity to %f",GetName(playerid),gravity);
        SendClientMessageToAll(COLOR_YELLOW,string);
        SetGravity(gravity);
    }
    return 1;
}
That should do it. Just added SetGravity(gravity) inside the last else, which was missing for some reason.
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)