Quote:
Originally Posted by Biesmen
Those else statements aren't used in a correct way, it won't work.
Thanks for trying.
@Drift Hunter
-Face palm-
pawn Код:
CMD:warn(playerid, params[]) { new giveplayerid, reason[128]; if(PlayerInfo[playerid][pAdmin] > 0) { if(sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_RED, "Usage: /warn [Playerid/PartOfName] [Reason]"); if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected."); if(PlayerInfo[giveplayerid][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_RED, "You can't warn this player."); MaxWarnings[giveplayerid]++; format(reason, sizeof(reason), "Admin {FF4500}%s(%i){FF0000} has warned {FF4500}%s(%i){FF0000} for: {FF4500}%s {FF0000}(%i/3)", PlayerName(playerid), playerid, PlayerName(giveplayerid), giveplayerid, reason, MaxWarnings[giveplayerid]); SendClientMessageToAll(COLOR_RED2, reason); if(MaxWarnings[giveplayerid] == 3) { SendClientMessage(playerid, COLOR_GREY, "You've been kicked for reaching the maximum amount of warnings"); Kick(giveplayerid); } }
That's the full code.
|
Man when i say full command i mean on whole code for one command ffs
How you think someone will help you if they dont have full code?
pawn Код:
//From here
CMD:command(playerid,params[])
{
//Whole code
return 1;
}
//Until here
Or you forgot return 1 and finish bracket?
Otherwise code looks fine to me