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);
format(string,sizeof(string),"[PN-Admin] Reason: %d.",strval(inputtext));
Код:
format(string,sizeof(string),"[PN-Admin] Reason: %d.",strval(inputtext)); |
format(string,sizeof(string),"[PN-Admin] Reason: %s.",inputtext);
You have the wrong function then, strval turns the string into an integer.
Simply do: Код:
format(string,sizeof(string),"[PN-Admin] Reason: %s.",inputtext); |