14.03.2014, 10:08
What will happen to this
It will ?
Like that ?
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
new
string[128],
sendername[MAX_PLAYER_NAME];
if(GetPVarInt(playerid, "dialog") != dialogid) { // Confirm the dialogid matches what we have in the PVar
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly trying to spoof a dialog ID (%d).", GetPlayerNameEx(playerid), playerid, dialogid);
ABroadCast(COLOR_YELLOW, string, 2);
format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID.", GetPlayerNameEx(playerid));
AddAutomatedFlag(playerid, string);
format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID (%d, %d).", GetPlayerNameEx(playerid), dialogid, response);
Log("logs/crash.log", string);
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case YOUR_DIALOG_NAME: //Change this to what ever your dialog is defined as
{
switch(listitem)
{
case 0:
{
//The first lot of items here
}
case 1:
{
//Second lot of items
}
case 2:
{
//And you guessed it, the third lot of items
}
}
}
}
}
return 1;
}
new
string[128],
sendername[MAX_PLAYER_NAME];
if(GetPVarInt(playerid, "dialog") != dialogid) { // Confirm the dialogid matches what we have in the PVar
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly trying to spoof a dialog ID (%d).", GetPlayerNameEx(playerid), playerid, dialogid);
ABroadCast(COLOR_YELLOW, string, 2);
format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID.", GetPlayerNameEx(playerid));
AddAutomatedFlag(playerid, string);
format(string, sizeof(string), "%s has possibly tried to spoof a dialog ID (%d, %d).", GetPlayerNameEx(playerid), dialogid, response);
Log("logs/crash.log", string);
return 1;
}