Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:rentparkiraj(playerid, params[], help)
- {
- #pragma unused params
- #pragma unused help
- if(UlogovanProvera[playerid] == 0) return SCM(playerid, -1, ""CRVENA"WARNING: "BELA"Morate se ulogovati da bi ste koristili ovu komandu.");
- if(PlayerInfo[playerid][pAdmin] < 4) return SCM(playerid, -1, ""CRVENA"WARNING: "BELA"Ne mozete koristiti ovu komandu jer niste Administrator.");
- if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,-1,""CRVENA" "BELA"Ne mozete koristiti ovu komandu jer se ne nalazite na motoru.");
- new rentcar = GetPlayerVehicleID(playerid);
- new bool:found,id;
- {
- for(new i = 1; i < sizeof(Rent_Info); i++)
- {
- if(Rent_Info[ i ][ rent_ModelID ] == rentcar)
- {
- found = true;
- id = i;
- break;
- }
- }
- if(!found)
- return SCM(playerid, -1, "CRVENA""Ne mozete parkirati ovo vozilo jer nije vip vozilo!");
- new Float:motorent_Pos[ 4 ], string[256];
- GetVehiclePos(rentcar, motorent_Pos[ 0 ], motorent_Pos[ 1 ], motorent_Pos[ 2 ]);
- GetVehicleZAngle(rentcar, motorent_Pos[ 3 ]);
- Rent_Info[ id ][ rent_PosX ] = motorent_Pos[ 0 ];
- Rent_Info[ id ][ rent_PosY ] = motorent_Pos[ 1 ];
- Rent_Info[ id ][ rent_PosZ ] = motorent_Pos[ 2 ];
- Rent_Info[ id ][ rent_PosA ] = motorent_Pos[ 3 ];
- DestroyVehicle(Rent_Info[ id ][ rent_ModelID ]);
- 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);
- new bzzb[128];
- 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);
- SCM(playerid, -1, string);
- format(string,sizeof(string),""#CRVENA"BPRP: "BELA"Uspesno ste parkirali vip vozilo, ID: %d", Rent_Info[ id ][ rent_ModelID ]);
- SCM(playerid, -1, string);
- Sacuvaj_Rent( id );
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment