17.09.2011, 09:03
I have maped a small town on the sea, and i try to put some pickup's and why ther dont displayed?
here is the code!
PHP код:
new SC;
new LS;
public OnGameModeInit()
{
SC = CreatePickup(1274,23,2041.3683,-5356.7188,13.1371,0);//SC karte
LS = CreatePickup(1274,23,1685.6185,-2333.7290,-2.6797,0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == SC)
{
ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Dobrodosli na SAN City Aerodrom","Karta za San Fierro (200$)\nKarta za Los Santos (100$)\nKarta za Las Venturas (250$)","Uredu","Prekid");
}
if (pickupid == LS)
{
ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"Dobrodosli na Los Santos Aerodrom","Karta za San Fierro (250$)\nKarta za SAN City (150$)\nKarta za Las Venturas (300$)","Uredu","Prekid");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 4)
{
if(response)
{
if(listitem == 0)//sf
{
}
if(listitem == 1)// ls
{
SetPlayerPos(playerid,1685.6185,-2333.7290,-2.6797);
SetPlayerFacingAngle(playerid,175.7893);
}
if(listitem == 2)//lv
{
}
}
}
if(dialogid == 5)
{
if(response)
{
if(listitem == 0)// sf
{
}
if(listitem == 1)// sc
{
SetPlayerPos(playerid,2041.6514,-5356.6143,11.5561);
SetPlayerFacingAngle(playerid,270.2007);
}
if(listitem == 2)// lv
{
}
}
}
return 1;
}