paperboy.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. PaperboyStartJob(playerid)
  2. {
  3. if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 481) return SendErrorMessage(playerid, "You need to be riding a bike in order to start working.");
  4. if(Iter_Count(House) <= 3) return SendErrorMessage(playerid, "There must be more than three houses on the server in order to do this job.");
  5. new houseid = Iter_Random(House);
  6. SetPlayerWorking(playerid, true);
  7. new Float:x, Float:y, Float:z;
  8. Property_GetExtPos(houseid, x, y, z);
  9. JobCheckpoint[playerid] = CreateDynamicCP(x, y, z, 4.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), playerid);
  10. SendClientMessage(playerid, 0xffcc80ff, "(Job) You have to deliver the newspapers around the city.");
  11. return 1;
  12. }
  13. PaperboyEnterCheckpoint(playerid)
  14. {
  15. if(IsPlayerInAnyVehicle(playerid)) return 0;
  16. if(Iter_Count(House) <= 3)
  17. {
  18. Job_StopWorking(playerid);
  19. return SendErrorMessage(playerid, "There must be more than three houses on the server in order to do this job.");
  20. }
  21. DestroyDynamicCP(JobCheckpoint[playerid]);
  22. JobCheckpoint[playerid] = INVALID_STREAMER_ID;
  23. new houseid = Iter_Random(House);
  24. new Float:x, Float:y, Float:z;
  25. Property_GetExtPos(houseid, x, y, z);
  26. JobCheckpoint[playerid] = CreateDynamicCP(x, y, z, 4.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), playerid);
  27. ApplyAnimation(playerid, "GRENADE", "WEAPON_THROWU", 4.1, 0, 0, 0, 0, 0, 1);
  28. return 1;
  29. }
  30. stock PaperboyStopsWorking(playerid)
  31. {
  32. IsPlayerConnected(playerid); // temp for warning
  33. }