Advertisement
iStack_RPG

[Tutoriale Scripting] Comanda (/closestcar) #2

Dec 7th, 2017
609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. CMD:closestcar(playerid, params[]) // Inceput comanda
  2. { // Deschidem acolada
  3. if(PlayerInfo[playerid][pAdmin] < 1)return SCM(playerid, -1, AdminOnly); // Verificam daca acel player are admin, si daca nu are sa ii arate mesajul de la 'AdminOnly'.
  4. if(IsPlayerInAnyVehicle(playerid))return SCM(playerid, COLOR_GREY, "Esti deja intr-un vehicul."); // Verificam daca adminul este deja intr-o masina.
  5. new thacar = GetClosestVehicle2(playerid, 100000);
  6. PutPlayerInVehicle(playerid, thacar, 0); // Cand da (/closestcar) sa il pun direct in masina.
  7. SCM(playerid, COLOR_GREY,"Ai fost teleportat in cel mai apropiat vehicul."); // Ii arata mesajul ca a fost teleportat la masina ce mai apoate e el.
  8. return 1; // Se termina comanda
  9. } // Inchidem acolada
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement