05.10.2015, 23:39
The issue is where I sent a message, saying the VIP has started a votekick. It doesn't display the "target"' name when sending the string.
pawn Код:
CMD:votekick(playerid, params[])
{
if(PlayerInfo[playerid][pVip] < 1) return SCM(pid,COLOR_GREY,ERROR);
new gstring[150], target, reason;
if(sscanf(params,"us[128]", target, reason)) return SCM(pid,COLOR_WHITE, "USAGE: /votekick [playerid] [reason]");
if(target == INVALID_PLAYER_ID) return SCM(pid,COLOR_GREY, "That player is not connected.");
// if(target == playerid) return SCM(pid,COLOR_GREY, "ERROR: You can't use that command on yourself.");
if(VIP_VOTEKICK[target] > 0) return SCM(pid,COLOR_GREY, "ERROR: Vote kick is already in progress for that player.");
if(PLAYER_VOTEKICK[playerid] == 1) return SCM(pid,COLOR_GREY, "ERROR: You've already voted to kick that player.");
format(gstring,sizeof(gstring), "Global: {00E8E8}V.I.P %s {FFFFFF}has started a vote kick on %s. (Reason: %s)", GetName(playerid), GetName(target), reason);
SCMA(COLOR_GREEN, gstring);
VIP_VOTEKICK[target] +=1;
PLAYER_VOTEKICK[playerid] = 1;
return 1;
}