What is wrong with this? :D -
vassilis - 02.11.2011
what is wrong with this D:
pawn Код:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR:Only admins can use this command!");
if(strcmp(cmd, "/kick", true) ==0) {
new giveid, reason[128];
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
if(giveid == INVALID_PLAYER_ID)return SendClientMessage(playerid, -1, "ERROR:This player isn't connected!");
else
{
new gname[MAX_PLAYER_NAME];
GetPlayerName(giveid, gname, sizeof(gname));
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "ADMIN KICK : %s has been kicked From The Server ( Reason : %s)", gname,reason);
SendClientMessageToAll(COLOR_PINK, string);
Kick(giveid);
}
return 1;
}
errors:
pawn Код:
C:\Users\Billaras\Desktop\[NBTDM]0.3cR5\NBTDM\gamemodes\nbtdm.pwn(2601) : error 076: underfined symbol "params".
2601 line is this:
pawn Код:
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
Re: What is wrong with this? :D - suhrab_mujeeb - 02.11.2011
Show us your line 2601.
Re: What is wrong with this? :D -
vassilis - 02.11.2011
help please
Re: What is wrong with this? :D -
Wesley221 - 02.11.2011
I dont think you have 'paramas'
pawn Код:
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
Params should work
Re: What is wrong with this? :D -
vassilis - 02.11.2011
no i just edited it now fast in here and made it by mistake "paramas"its actually say "params"..
Re: What is wrong with this? :D -
Kostas' - 02.11.2011
Why at the whole code it's
pawn Код:
if(sscanf(params, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
And at this you wrote "2601 line is this:" it's
pawn Код:
if(sscanf(paramas, "rs[128]",giveid,reason))return SendClientMessage(playerid, -1, "Usage:/kick [id] [reason]");
Re: What is wrong with this? :D -
vassilis - 02.11.2011
to grapsa katala7os to ksanaftia3a..sthn biasynh mou :P
Re: What is wrong with this? :D -
Wesley221 - 02.11.2011
strcmp doesnt have 'params'. As youre using 'cmd' or 'cmdtext' in strcmp, you should change the params to 'cmd' or 'cmdtext'. I dont know what youre using for that, so try it yourself.
Re: What is wrong with this? :D -
vassilis - 02.11.2011
Quote:
Originally Posted by Wesley221
strcmp doesnt have 'params'. As youre using 'cmd' or 'cmdtext' in strcmp, you should change the params to 'cmd' or 'cmdtext'. I dont know what youre using for that, so try it yourself.
|
will you believe that i didnt notice that i was using strcmp?thx btw wesley it is compiled: DDD
EDIT: when i am going to kick an invalid id .it doesnt say :"Invalid player id "it says "Kick [playerid] [reason] and when i am writing the reason too it says the same thing again D:
P.S : Make more tutorials please it helps a lot and lot people too : DD