18.10.2011, 18:25
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;
}
But if I do /changegravity 1 it works fine..