07.12.2015, 13:21
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CARPENTIERE)
{
if(response) //this is the error line
{
if((Carpentiere[playerid] == 0))
{
ShowInfoForPlayer(playerid,"Hai accettato il lavoro.", 3000);
Carpentiere[playerid] = 1;
new x = random (2);
if(x == 0)
{
SetPlayerCheckpoint(playerid, 1280.0118, -1262.7102, 13.5107, 2.0);
}
if(x == 1)
{
SetPlayerCheckpoint(playerid,1280.9083, -1242.0677, 13.9160, 2.0);
}
if(x == 2 || x ==3)
{
SetPlayerCheckpoint(playerid,1268.9485, -1234.4961, 17.0519, 2.0);
}
CP[playerid] = 1;
}
else
{
if((Carpentiere[playerid] == 1))
{
ShowInfoForPlayer(playerid,"Hai annullato il lavoro.", 3000);
Carpentiere[playerid] = 0;
DisablePlayerCheckpoint(playerid);
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid,0);
CP[playerid] = 0;
}
}
}
}
return 1;
}
![Smiley](images/smilies/smile.png)