Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. public OnPlayerDeath(playerid,killerid)
  2. {
  3. if(GetDistanceBetweenPoint(playerid,2030.1873,-1404.7402,17.2517) > GetDistanceBetweenPoint(playerid,1173.2455,-1323.6012,15.3944))
  4. {
  5. printf("%f | %f",GetDistanceBetweenPoint(playerid,2030.1873,-1404.7402,17.2517),GetDistanceBetweenPoint(playerid,1173.2455,-1323.6012,15.3944));
  6. SpawnAtHospial[playerid] = 1;
  7. printf("%d",SpawnAtHospial[playerid]);
  8. Dead[playerid] = 1;
  9. SendClientMessage(Called[playerid],PlainColour,"2");
  10. }
  11. if(GetDistanceBetweenPoint(playerid,1173.2455,-1323.6012,15.3944) < GetDistanceBetweenPoint(playerid,2030.1873,-1404.7402,17.2517))
  12. {
  13. printf("%f | %f",GetDistanceBetweenPoint(playerid,1173.2455,-1323.6012,15.3944),GetDistanceBetweenPoint(playerid,2030.1873,-1404.7402,17.2517));
  14. SpawnAtHospial[playerid] = 2;
  15. printf("%d",SpawnAtHospial[playerid]);
  16. Dead[playerid] = 1;
  17. SendClientMessage(Called[playerid],PlainColour,"3");
  18. }
  19.  
  20. SendClientMessage(Called[playerid],PlainColour,"1");
  21. if(InACall[playerid] == 1)
  22. {
  23. AwaitingCall[playerid] = 0;
  24. SendClientMessage(Called[playerid],PlainColour,"The tone went dead!");
  25. InACall[Called[playerid]] = 0;
  26. InACall[playerid] = 0;
  27. if(!IsPlayerInAnyVehicle(InACall[Called[playerid]]))
  28. {
  29. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
  30. }
  31. }
  32.  
  33.  
  34. if(Job[playerid] != 0) SendClientMessage(playerid,0xC0C0C0FF,"Your job was cancelled!");
  35. AwaitingJob[playerid] = 0;
  36. Job[playerid] = 0;
  37. Dead[playerid] = 1;
  38. GotDrugPacks[playerid] = 0;
  39. SetPlayerHealth(playerid,100);
  40. SetPlayerInterior(playerid,0);
  41. SetPlayerVirtualWorld(playerid,0);
  42. SendClientMessage(Called[playerid],PlainColour,"4");
  43. return 1;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement