How to check what a player wrote in a dialog
#9

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) 
{ 
	if(dialogid == YourDialogID) 
	{ 
        	if(response) 
        	{ 
			new pID, reason[32], string[144];
            		if(sscanf(inputtext, "us[32]", pID, reason))
			{
				//errorcode
			}
            		else
			{
				format(string, sizeof(string), "[KICK]: %s has been kicked by %s Reason: %s", GetName(pID), GetName(playerid), reason);
				SendClientMessageToAll(COLOR_RED, string);
				Kick(pID);
			}
        	} 
    	} 
}
^ Requires sscanf https://sampforum.blast.hk/showthread.php?tid=120356
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)