Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!strcmp(cmdtext, "/asellcar", true))
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Morate biti ulogovani !");
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 1340)
- {
- new vehid = GetPlayerVehicleID(playerid);
- new Float:x,Float:y,Float:z;
- new Float:a;
- CarInfo[vehid][cOwned] = 0;
- strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~w~Vozilo uspjesno prodato", 10000, 3);
- GetVehiclePos(vehid, x, y, z);
- GetVehicleZAngle(vehid, a);
- CarInfo[vehid][cLocationx] = x;
- CarInfo[vehid][cLocationy] = y;
- CarInfo[vehid][cLocationz] = z;
- CarInfo[vehid][cAngle] = a;
- RemovePlayerFromVehicle(playerid);
- TogglePlayerControllable(playerid, 1);
- OnPropUpdate();
- DestroyVehicle(vehid);
- CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],CarInfo[vehid][cColorOne],CarInfo[vehid][cColorTwo],60000);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "[SS-RP] Niste ovlasteni da koristite ovu komandu!");
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment