Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:isodinti(playerid, params[])
- {
- if(ZInfo[playerid][darbas]==1)
- {
- if(!IsPlayerInAnyVehicle(playerid)){SendClientMessage(playerid,RAUDONA, "Turite b?ti ma?inoje."); return 1;}
- new id[MAX_PLAYER_NAME];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, PILKA, "Nor?dami panaudoti ?ia komand? ra?ykite: /isodinti [VARDAS_PAVARD?]");
- new vardas = GetPlayeridMid(id);
- if(vardas == INVALID_PLAYER_ID)
- {
- SendClientMessage(playerid, RAUDONA, "?is ?aid?jas yra atsiung?s.");
- return 1;
- }
- if(vardas == playerid)
- {
- SendClientMessage(playerid, RAUDONA, "Sav?s isodinti negalite.");
- return 1;
- }
- new masina = GetPlayerVehicleID(playerid);
- new Float:poz[3];
- GetPlayerPos(vardas, poz[0],poz[1],poz[2]);
- if(!IsPlayerInRangeOfPoint(10, playerid, poz[0],poz[1],poz[2])){SendClientMessage(playerid, RAUDONA, "?is ?aid?jas per toli."); return 1;}
- PutPlayerInVehicle(vardas, masina, 2);
- TogglePlayerControllable(vardas, 0);
- SendClientMessage(playerid, RAUDONA, "Isodintas");
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment