15.01.2013, 13:07
Hey guys i wanna ask you how to check is that player name exist in dialog system. Thanks
if(strcmp(inputtext, "AnyName", true) == 0) //name matched else //name not matched
if(sscanf(inputtext,"u",playeridd) == INVALID_PLAYER_ID)) |
new play[MAX_PLAYER_NAME]; new playID = StrFind(play); if(sscanf(inputtext,"u",playID)) return ShowPlayerDialog(playerid,44,DIALOG_STYLE_INPUT,"b la bla if(playID == INVALID_PLAYER_ID) |
CMD:kick(playerid, params[]) //My command /kick to kick players
{
new playersID; //This is what we use to save the ID of the player we want to kick
if(sscanf(params, "u", playersID)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /kick [playerid]"); //Is returned because I did not add the 'playerid' part of the command
if(playersID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "Player is not connected."); //Is only returned if you have included all parameters
//continues...
new play[MAX_PLAYER_NAME];
new playID;
if(sscanf(inputtext, "u", playID)) return SendClientMessage(playerid, 0xFF0000FF, "You must enter an id.");
if(playID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "Player is not connected.");
//Code continues