Advertisement
Guest User

Untitled

a guest
Jun 17th, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.38 KB | None | 0 0
  1. CMD:work(playerid, params[])
  2. {
  3.     if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  4.     if(IsPlayerConnected(playerid))
  5.     {    
  6.         if(PlayerInfo[playerid][pJob] == id job trucker)
  7.         {
  8.             if(IsPlayerInRangeOfPoint(playerid, 15.0, coordonatele job-ului))
  9.             {
  10.                 if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti folosi aceasta comanda deoarece te afli intr-un vehicul.");
  11.                 if(Trucker2[playerid] == 0 && viddd[playerid] == 0 && workdeja[playerid] == 0)
  12.                 {
  13.                     Trucker2[playerid] = 1;
  14.                     SetPlayerCheckpoint(playerid,coordonatele de unde sa-ti alegi ruta,15.0);
  15.                     SendClientMessage(playerid, COLOR_WHITE, "{FEC3AC}Mergi la checkpoint pentru a incepe munca.");
  16.                     new Float:x,Float:y,Float:z;
  17.                     GetPlayerPos(playerid, x, y, z);
  18.                     Gas[TruckID[playerid]] = 100;
  19.                     TruckID[playerid] = AddStaticVehicle(515, x,y+1,z, 0.0,  1, 1);
  20.                     PutPlayerInVehicle(playerid, TruckID[playerid],0);
  21.                     SetTimerEx("timertrucker", 30000, 0, "i", playerid);
  22.                     workdeja[playerid] = 2;
  23.                 }
  24.             }
  25.             else
  26.             {
  27.                 SCM(playerid,-1, "Nu esti in locatia potrivita, ti-a fost setat un checkpoint.");
  28.                 SetPlayerCheckpoint(playerid, pui ce coordonate ai tu);
  29.             }
  30.         }
  31.     }
  32.     return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement