12.10.2010, 21:15
(
Последний раз редактировалось spyr0x; 12.10.2010 в 21:26.
)
I have a problem with the /kick command where the message from ( strval(inputtext) ) wont show.
Here is the code to open the dialog:
And here is the dialog code:
The message thats going to show the ( strval(inputtext) ) is this:
Please help me solve the problem.
Thanks.
Here is the code to open the dialog:
Код:
ShowPlayerDialog(playerid, 005, DIALOG_STYLE_INPUT, "Kick", "Please enter the reason.", "Kick", "Cancel");
Код:
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;
}
}
}
Код:
format(string,sizeof(string),"[PN-Admin] Reason: %s.",strval(inputtext)); SendClientMessageToAll(red, string);
Thanks.


