03.06.2011, 23:34
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_MUDAR_FACCAO)
{
if(response)
{
if(listitem)
{
SetPlayerTeam(playerid, cv);
Spawn(playerid);
SetPlayerSkin(playerid, 47);
}
else if(listitem == 1)
{
SetPlayerTeam(playerid, tcc);
Spawn(playerid);
SetPlayerSkin(playerid, 105);
}
else if(listitem == 2)
{
SetPlayerTeam(playerid, tcp);
Spawn(playerid);
SetPlayerSkin(playerid, 107);
}
else if(listitem == 3)
{
SetPlayerTeam(playerid, ada);
Spawn(playerid);
SetPlayerSkin(playerid, 102);
}
else if(listitem == 4)
{
SetPlayerTeam(playerid, pcc);
Spawn(playerid);
SetPlayerSkin(playerid, 109);
}
else if(listitem == 5)
{
SetPlayerTeam(playerid, pcp);
Spawn(playerid);
SetPlayerSkin(playerid, 109);
}
SetPlayerHealth(playerid, 0);
}
}
else if(dialogid == DIALOG_ESCOLHE_FACCAO)
{
if(response)
{
if(listitem)
{
SetPlayerTeam(playerid, cv);
Spawn(playerid);
SetPlayerSkin(playerid, 47);
}
else if(listitem == 1)
{
SetPlayerTeam(playerid, tcc);
Spawn(playerid);
SetPlayerSkin(playerid, 105);
}
else if(listitem == 2)
{
SetPlayerTeam(playerid, tcp);
Spawn(playerid);
SetPlayerSkin(playerid, 107);
}
else if(listitem == 3)
{
SetPlayerTeam(playerid, ada);
Spawn(playerid);
SetPlayerSkin(playerid, 102);
}
else if(listitem == 4)
{
SetPlayerTeam(playerid, pcc);
Spawn(playerid);
SetPlayerSkin(playerid, 109);
}
else if(listitem == 5)
{
SetPlayerTeam(playerid, pcp);
Spawn(playerid);
SetPlayerSkin(playerid, 109);
}
}
}
return 1;
}