31.05.2015, 17:47
Hello,
I like to make a exception for the arms and drug dealer job where only families member can join those jobs. Though i don't know where to look after.
Here is the code
but i guess if i put this code
in that code it wont work.
These are the pickups
I like to make a exception for the arms and drug dealer job where only families member can join those jobs. Though i don't know where to look after.
Here is the code
Код:
jobsOnPickupPickup(playerid, pickupid) { new title[128]; dialogstr[0] = 0; for(new i=0;i<sizeof(JobPickups);i++) { if(JobPickups[i][EJobPickupID] == pickupid) { format(dialogstr,sizeof(dialogstr),"{FFFFFF}Would you like to join the %s Job? Press \"{FF0000}Accept{FFFFFF}\" to accept, or \"{FF0000}Reject{FFFFFF}\" to reject",JobPickups[i][EJobName]); format(title,sizeof(title),"{00BFFF}%s Job Offer",JobPickups[i][EJobName]); new remaining = CanTakeJob(playerid); if(remaining != 0) { format(title, sizeof(title), "You must wait {FF6347}%d{FFFFFF} minute(s) for your job contract to finish!", remaining/60); SendClientMessage(playerid, X11_WHITE, title); return 0; } SetPVarInt(playerid, "JobOffer", i); ShowPlayerDialog(playerid, _:EJobs_JobOffer, DIALOG_STYLE_MSGBOX, title, dialogstr, "Accept", "Reject"); movePlayerBack(playerid, 3.0); } } return 1; }
Код:
} else if(GetPVarInt(playerid, "Family") == 0) { SendClientMessage(playerid, X11_TOMATO_2, "You must be in a family."); return 1; }
These are the pickups
Код:
new JobPickups[][EJobInfo] = { {"Trash Cleaner",359.68, 180.25, 1008.38, 3, 1, 0, Text3D:0,2322.636474, -2077.395263, 13.321226, 0}, {"Drug Dealer",2143.82, -1674.08, 15.09,0 ,0 ,0 , Text3D:0,2168.98, -1679.85, -15.09, 1}, {"Arms Dealer",2666.66, -1108.06, 69.39,0 ,0 ,0 , Text3D:0,2666.66, -1108.06, 69.39, 1}, {"Taxi Driver", 359.47, 184.91, 1008.38, 3, 1, 0 ,Text3D:0, 1763.25, -1900.96, 13.56, 0}, {"Mercenary", 757.99, 5.37, 1000.70, 5,0, 0, Text3D:0,2232.48, -1726.69, 13.55, 1}, {"Mechanic",358.99, 167.42, 1008.38, 3, 1, 0, Text3D:0, 1637.53, -1103.15, 23.91, 0}, {"Smuggler",2196.027832, -2236.349121, 13.546875, 0, 0, 0, Text3D:0,2187.762695, -2273.814208, 13.546875,1}, {"Lawyer",358.99, 163.11, 1008.38, 3, 1, 0, Text3D:0,358.62, 163.11, 1008.38,0}, {"Pizza Man",2100.7856, -1804.1826, 13.5546, 0, 0, 0, Text3D:0,2100.7856, -1804.1826, 13.5546,0}, {"Crafter",1900.399780, -1769.010864, 13.557812, 0, 0, 0, Text3D:0,1900.399780, -1769.010864, 13.557812,1} };