Guest User

Untitled

a guest
Jul 8th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. if(!strcmp(cmdtext, "/asellcar", true))
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(gPlayerLogged[playerid] == 0)
  6. {
  7. SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Morate biti ulogovani !");
  8. return 1;
  9. }
  10. if(PlayerInfo[playerid][pAdmin] >= 1340)
  11. {
  12. new vehid = GetPlayerVehicleID(playerid);
  13. new Float:x,Float:y,Float:z;
  14. new Float:a;
  15. CarInfo[vehid][cOwned] = 0;
  16. strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
  17. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  18. GameTextForPlayer(playerid, "~w~Vozilo uspjesno prodato", 10000, 3);
  19. GetVehiclePos(vehid, x, y, z);
  20. GetVehicleZAngle(vehid, a);
  21. CarInfo[vehid][cLocationx] = x;
  22. CarInfo[vehid][cLocationy] = y;
  23. CarInfo[vehid][cLocationz] = z;
  24. CarInfo[vehid][cAngle] = a;
  25. RemovePlayerFromVehicle(playerid);
  26. TogglePlayerControllable(playerid, 1);
  27. OnPropUpdate();
  28. DestroyVehicle(vehid);
  29. 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);
  30. return 1;
  31. }
  32. else
  33. {
  34. SendClientMessage(playerid, COLOR_GREY, "[SS-RP] Niste ovlasteni da koristite ovu komandu!");
  35. return 1;
  36. }
  37. }
  38. return 1;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment