Authority
#2

How can you honestly be so clueless?

pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1){return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
You're checking if they ARE an admin and THEN not letting them use the command.

Although you're new to zcmd/sscanf, common sense still should apply.

pawn Код:
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "* Invalid player ID!");
You're checking if the user is(n't) connected before you've parsed a value to the variable, therefore the ID is constantly 0 and the command is only going to work for ID 0. Plus, the variable you want to use is 'otherID' I assume.

pawn Код:
new string[256];
Why?! You're not even using 64 cells in the format function...

pawn Код:
if(sscanf(params, "rii", otherId))
Use 'u', not 'r'.. You only have one parameter, what's with the triple usage of 'i'?
Reply


Messages In This Thread
Authority - by Scriptissue - 07.10.2010, 22:38
Re: Authority - by Calgon - 07.10.2010, 22:40
Re: Authority - by Lenny the Cup - 07.10.2010, 22:42
Re: Authority - by Scenario - 07.10.2010, 22:46
Re: Authority - by Lenny the Cup - 07.10.2010, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)