I use sscanf for my votekick command
Top of gamemode :
Whole /votekick cmd script :
But, ingame it shows like this when I type /votekick without the id and the reason :
(My IGN : LaaT)
It suppose to show only the [Error:] /votekick <id> <reason> when I type /votekick only.
How can I fix this? My server already had streamer plugin, and I already include the sscanf in my gamemode.
Quote:
CMD:votekick(playerid, params[]) { new TargetName[MAX_PLAYER_NAME]; GetPlayerName(VotekickPlayerID, TargetName, sizeof( TargetName)); if(sscanf(params, "us[128]", VotekickPlayerID, VotekickReason)) { SendClientMessage(playerid, -1, "[Error:] /votekick <id> <reason>"); } |
Quote:
new VotekickPlayerID; new VotekickReason; |
Quote:
CMD:votekick(playerid, params[]) { new TargetName[MAX_PLAYER_NAME]; GetPlayerName(VotekickPlayerID, TargetName, sizeof( TargetName)); if(sscanf(params, "us[128]", VotekickPlayerID, VotekickReason)) { SendClientMessage(playerid, -1, "[Error:] /votekick <id> <reason>"); } // new MyName[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, MyName, sizeof( MyName)); if(IsVotekickStarted == true) { SendClientMessage(playerid, -1, "[Error:] Votekick already started!"); } else { if(!IsPlayerConnected(VotekickPlayerID)) { SendClientMessage(playerid, -1, "[ERROR:] The player is not connected to the server!"); } else { format(string, sizeof(string), "[VOTEKICK] %s has started a votekick on %s reason: %s", MyName, TargetName, VotekickReason); SendClientMessageToAll(-1, string); SendClientMessageToAll(-1, "Use /vote to choose YES or NO"); SetTimer("VotekickTimer", 60000, false); IsVotekickStarted = true; } } return 1; } |
(My IGN : LaaT)
Quote:
[Error:] /votekick <id> <reason> [VOTEKICK] LaaT has started a votekick on LaaT reason : Use /vote to choose YES or NO |
How can I fix this? My server already had streamer plugin, and I already include the sscanf in my gamemode.