Quote:
Originally Posted by xir
Can you try this?
pawn Код:
CMD:setgravity(playerid, params[]) { new Gravity, string[128], pName[MAX_PLAYER_NAME]; if(PVar[playerid][pLevel] < 4) { if (sscanf(params, "f", Gravity)) return SendClientMessage(playerid, -1, "* Usage : /setgravity [50 to -50]"); else if(Gravity > 50 || Gravity < -50) //8245 { { SetGravity(Gravity); format(string, sizeof(string), "*** Administrator %s has set the gravity to %d", pName, Gravity); SendClientMessageToAll(-1, string); } } else return SendClientMessage(playerid,-1, "ERROR : Gravity cant be above 50 or under -50!"); } else return SendClientMessage(playerid, -1, "ERROR : You have to be Administrator level 4 to use this command!"); return 1; }
|
i got a stock pName(playerid), and i edited your code, and it works now, thanks.