Guest User

Untitled

a guest
Jul 18th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. COMMAND:isodinti(playerid, params[])
  2. {
  3. if(ZInfo[playerid][darbas]==1)
  4. {
  5. if(!IsPlayerInAnyVehicle(playerid)){SendClientMessage(playerid,RAUDONA, "Turite b?ti ma?inoje."); return 1;}
  6.  
  7. new id[MAX_PLAYER_NAME];
  8. if(sscanf(params, "u", id)) return SendClientMessage(playerid, PILKA, "Nor?dami panaudoti ?ia komand? ra?ykite: /isodinti [VARDAS_PAVARD?]");
  9.  
  10. new vardas = GetPlayeridMid(id);
  11. if(vardas == INVALID_PLAYER_ID)
  12. {
  13. SendClientMessage(playerid, RAUDONA, "?is ?aid?jas yra atsiung?s.");
  14. return 1;
  15. }
  16. if(vardas == playerid)
  17. {
  18. SendClientMessage(playerid, RAUDONA, "Sav?s isodinti negalite.");
  19. return 1;
  20. }
  21. new masina = GetPlayerVehicleID(playerid);
  22. new Float:poz[3];
  23. GetPlayerPos(vardas, poz[0],poz[1],poz[2]);
  24. if(!IsPlayerInRangeOfPoint(10, playerid, poz[0],poz[1],poz[2])){SendClientMessage(playerid, RAUDONA, "?is ?aid?jas per toli."); return 1;}
  25. PutPlayerInVehicle(vardas, masina, 2);
  26. TogglePlayerControllable(vardas, 0);
  27. SendClientMessage(playerid, RAUDONA, "Isodintas");
  28. }
  29. return 1;
  30. }
Add Comment
Please, Sign In to add comment