strval(inputtext) Leaves no message
#1

I have a problem with the /kick command where the message from ( strval(inputtext) ) wont show.

Here is the code to open the dialog:
Код:
ShowPlayerDialog(playerid, 005, DIALOG_STYLE_INPUT, "Kick", "Please enter the reason.", "Kick", "Cancel");
And here is the dialog code:
Код:
	if(dialogid == 005)
	{
	    if(!response) {
	    }
	    else {
		new vname[MAX_PLAYER_NAME];
		new vname2[MAX_PLAYERS];
		new pname[MAX_PLAYER_NAME];
		new string[256];
		GetPlayerName(inputid[playerid], vname, sizeof(vname));
		format(vname2[playerid], 128, "%s", vname);
		if(victim[playerid] == vname2[playerid]) {
		GetPlayerName(playerid, pname, sizeof(pname));
		format(string,sizeof(string),"[PN-Admin] Player %s [%d] was kicked by admin %s.",victim[playerid], inputid[playerid], pname);
		SendClientMessageToAll(red, string);
		format(string,sizeof(string),"[PN-Admin] Reason: %s.",strval(inputtext));
		SendClientMessageToAll(red, string);
		//Kick(inputid[playerid]);
                victim[playerid] = -1;
		inputid[playerid] = -1;
		vname2[playerid] = -1;
		}
		else {
		format(string,sizeof(string),"[PN-Admin] Player %s [%d] has disconnected.",victim[playerid], inputid[playerid]);
		SendClientMessage(playerid, orange, string);
		inputid[playerid] = -1;
		victim[playerid] = -1;
		vname2[playerid] = -1;
		}
	    }
	}
The message thats going to show the ( strval(inputtext) ) is this:
Код:
format(string,sizeof(string),"[PN-Admin] Reason: %s.",strval(inputtext));
SendClientMessageToAll(red, string);
Please help me solve the problem.

Thanks.
Reply


Messages In This Thread
[SOLVED] strval(inputtext) Leaves no message - by spyr0x - 12.10.2010, 21:15
Re: strval(inputtext) Leaves no message - by Grim_ - 12.10.2010, 21:19
Re: strval(inputtext) Leaves no message - by spyr0x - 12.10.2010, 21:22
Re: strval(inputtext) Leaves no message - by Grim_ - 12.10.2010, 21:25
Re: strval(inputtext) Leaves no message - by spyr0x - 12.10.2010, 21:26
Re: strval(inputtext) Leaves no message - by Zeex - 12.10.2010, 21:29
Re: strval(inputtext) Leaves no message - by Niixie - 13.10.2010, 05:05

Forum Jump:


Users browsing this thread: 1 Guest(s)