11.06.2012, 22:06
i made a thngy for dialog and it gives me a pawno stops responding look.
or its here?
pawn Код:
if(dialogid==Dialog_Test)
{
if(response)//daca apasa primul buton
{
if(listitem==0)//Ajutor
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat Jobul Detective :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 1;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==1)//Teleporturi
{
if(strcmp(x_nr,"Detective",true) == 0)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat Jobul Detective :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 1;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==2)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Lawyer :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 2;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==3)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Bodyguard :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 8;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==4)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Bus Driver :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 14;
PlayerInfo[playerid][pContractTime] = 5;
CP[playerid] = 1000;
SetPlayerCheckpoint(playerid, 1792.6107,-1915.7822,13.3946, 3.0);
}
}
if(listitem==5)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Boxer :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 12;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==6)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Sweeper :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 18;
PlayerInfo[playerid][pContractTime] = 5;
CP[playerid] = 1002;
SetPlayerCheckpoint(playerid, 1102.3403,-1232.5560,15.8203, 3.0);
}
}
if(listitem==7)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Car Dealer :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 10;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==8)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Paper Boy :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 15;
PlayerInfo[playerid][pContractTime] = 5;
}
}
if(listitem==9)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Farmer :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 11;
PlayerInfo[playerid][pContractTime] = 5;
CP[playerid] = 1004;
SetPlayerCheckpoint(playerid, -109.1764,32.7763,3.1094, 3.0);
}
}
if(listitem==10)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Trucker :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 16;
PlayerInfo[playerid][pContractTime] = 5;
CP[playerid] = 1003;
SetPlayerCheckpoint(playerid, 81.4055,-1126.1174,0.6408, 3.0);
}
}
if(listitem==11)
{
if (GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0x83FF46FF, "::: Ai luat jobul Garbage Collector :::");
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pJob] = 19;
PlayerInfo[playerid][pContractTime] = 5;
}
}
return 1;
}
}
}
return 1;
}
pawn Код:
if(strcmp(cmd,"/takejob",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(25.0,playerid,1236.1875,-2517.4473,253.4778))
{
ShowPlayerDialog(playerid,Dialog_Test,DIALOG_STYLE_LIST,"Bar","Detective\nLawyer\nBodyguard\nFarmer","Selecteaza","Inchide");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not in the JP !");
return 1;
}
}//not connected
return 1;
}