cone97

Untitled

Jun 25th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. YCMD:rentparkiraj(playerid, params[], help)
  2. {
  3. #pragma unused params
  4. #pragma unused help
  5. if(UlogovanProvera[playerid] == 0) return SCM(playerid, -1, ""CRVENA"WARNING: "BELA"Morate se ulogovati da bi ste koristili ovu komandu.");
  6. if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, -1, ""CRVENA"WARNING: "BELA"Ne mozete koristiti ovu komandu jer niste Administrator.");
  7. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""CRVENA" "BELA"Ne mozete koristiti ovu komandu jer se ne nalazite na motoru.");
  8. new rentcar = GetPlayerVehicleID(playerid);
  9. new bool:found,id;
  10. {
  11. for(new i = 1; i < sizeof(Rent_Info); i++)
  12. {
  13. if(Rent_Info[ i ][ rent_ModelID ] == rentcar)
  14. {
  15. found = true;
  16. id = i;
  17. break;
  18. }
  19. }
  20. if(!found)
  21. return SCM(playerid, -1, "CRVENA""Ne mozete parkirati ovo vozilo jer nije vip vozilo!");
  22. new Float:motorent_Pos[ 4 ], string[256];
  23. GetVehiclePos(rentcar, motorent_Pos[ 0 ], motorent_Pos[ 1 ], motorent_Pos[ 2 ]);
  24. GetVehicleZAngle(rentcar, motorent_Pos[ 3 ]);
  25. Rent_Info[ id ][ rent_PosX ] = motorent_Pos[ 0 ];
  26. Rent_Info[ id ][ rent_PosY ] = motorent_Pos[ 1 ];
  27. Rent_Info[ id ][ rent_PosZ ] = motorent_Pos[ 2 ];
  28. Rent_Info[ id ][ rent_PosA ] = motorent_Pos[ 3 ];
  29. DestroyVehicle(Rent_Info[ id ][ rent_ModelID ]);
  30. Rent_Info[ id ][ rent_ModelID ] = CreateVehicle(Rent_Info[ id ][ rent_ModelID ], motorent_Pos[ 0 ], motorent_Pos[ 1 ], motorent_Pos[ 2 ], motorent_Pos[ 3 ], Rent_Info[ id ][ rent_Boja1 ], Rent_Info[ id ][ rent_Boja2 ], -1);
  31. new bzzb[128];
  32. format(bzzb,sizeof(bzzb),""CRVENA"[BP:SECURITY] %s je parkirao vip vozilo ID: %d, fajl ID: %d", GetName( playerid ), Rent_Info[ id ][ rent_ModelID ], id);
  33. SCM(playerid, -1, string);
  34. format(string,sizeof(string),""#CRVENA"BPRP: "BELA"Uspesno ste parkirali vip vozilo, ID: %d", Rent_Info[ id ][ rent_ModelID ]);
  35. SCM(playerid, -1, string);
  36. Sacuvaj_Rent( id );
  37. return 1;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment