Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:work(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pJob] == id job trucker)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, coordonatele job-ului))
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Nu poti folosi aceasta comanda deoarece te afli intr-un vehicul.");
- if(Trucker2[playerid] == 0 && viddd[playerid] == 0 && workdeja[playerid] == 0)
- {
- Trucker2[playerid] = 1;
- SetPlayerCheckpoint(playerid,coordonatele de unde sa-ti alegi ruta,15.0);
- SendClientMessage(playerid, COLOR_WHITE, "{FEC3AC}Mergi la checkpoint pentru a incepe munca.");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid, x, y, z);
- Gas[TruckID[playerid]] = 100;
- TruckID[playerid] = AddStaticVehicle(515, x,y+1,z, 0.0, 1, 1);
- PutPlayerInVehicle(playerid, TruckID[playerid],0);
- SetTimerEx("timertrucker", 30000, 0, "i", playerid);
- workdeja[playerid] = 2;
- }
- }
- else
- {
- SCM(playerid,-1, "Nu esti in locatia potrivita, ti-a fost setat un checkpoint.");
- SetPlayerCheckpoint(playerid, pui ce coordonate ai tu);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement