|
if(GetPVarInt(playerid,"Inmission") == 1) { SendClientMessage(playerid, YOUR_COLOR,"You're already delivering passengers!"); return 1; } |
|
use SetPVarInt(playerid,"Inmission,1); at your random function.
Before the random part, add: Replace YOUR_COLOR by your own color. |
if (!strcmp("/work", cmdtext, true))
40. {
if(GetPVarInt(playerid,"Inmission") == 1) {
SendClientMessage(playerid, YOUR_COLOR,"You're already delivering passengers!"); return 1;
}
41. new rand = random(3);
42. switch(rand)
43. {
44. case 0:
45. {
46. SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Waste from Los Santos Airport to Landfill");
47. SetPlayerCheckpoint(playerid, -694.9723, -1906.2748, 11.6886, 10.0);
SetPVarInt(playerid,"Inmission",1);
48. }
49. case 1:
50. {
51. SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Skateboards from Los Santos Airport to Haydens House");
52. SetPlayerCheckpoint(playerid, -899.8469, -1947.8582, 80.2679, 10.0);
SetPVarInt(playerid,"Inmission",1);
53. }
54. case 2:
55. {
56. SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Airport Parts from Los Santos Airport to Los Santos Plane Garage");
57. SetPlayerCheckpoint(playerid, 1379.6129, -2416.9490, 14.4758, 10.0);
SetPVarInt(playerid,"Inmission",1);
58. }
59. }
60. return 1;
61. }
62. return 0;
63.}