MistarA

Untitled

Dec 29th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. CMD:putpizza(playerid, params[])
  2. {
  3. if(IsInJob[playerid] == 1)
  4. {
  5. if(IsPlayerAttachedObjectSlotUsed(playerid,PIZZA_INDEX))
  6. {
  7. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  8. {
  9. new Float:X,Float:Y,Float:Z;
  10. for(new j=0;j<5;j++)
  11. {
  12. GetVehiclePos(pizzabikes[j],X,Y,Z);
  13. if(IsPlayerInRangeOfPoint(playerid,3.0,X,Y,Z))
  14. {
  15. if(PizzaBikesPizzas[GetPlayerVehicleID(j)] <= 4)
  16. {
  17. new string[56];
  18. PizzaBikesPizzas[GetPlayerVehicleID(j)]=5;
  19. SendClientMessage(playerid,-1," Ai pus {FF0000}5 {FFFFFF}pizza!");
  20. RemovePlayerAttachedObject(playerid, PIZZA_INDEX);
  21. ClearAnimations(playerid);
  22. PlayerTextDrawHide(playerid,PizzasText[j]);
  23. format(string,sizeof(string),"Pizza: ~r~%d~w~ /~g~ 5",PizzaBikesPizzas[GetPlayerVehicleID(j)]);
  24. PlayerTextDrawSetString(playerid,PizzasText[j],string);
  25. PlayerTextDrawShow(playerid,PizzasText[j]);
  26. SendClientMessage(playerid,-1,"Pizza a fost pusa");
  27. ApplyAnimation(playerid, "INT_HOUSE", "wash_up",4.1,0,0,0,0,0,1);
  28. return 1;
  29. }
  30. else
  31. {
  32. SendClientMessage(playerid,-1," Aceasta motocicleta are deja 5 pizza!");
  33. return 1;
  34. }
  35. }
  36. }
  37. }
  38. else return SendClientMessage(playerid,-1," Trebuie sa fii pe jos pentru a pune pizza!");
  39. }
  40. else return SendClientMessage(playerid,-1," Trebuie sa ai o pizza in mana");
  41. }
  42. return 1;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment