RedGun Posted August 24, 2017 Posted August 24, 2017 (edited) Salut, am facut o comanda /work, insa nu prea stiu cum sa setez pentru jucator atunci cand i se creaza masina doar el sa poata da F la ea nu si alti jucatori, gen pentru alti jucatori masina sa fie incuiata. CMD:work(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first."); if(PlayerInfo[playerid][pCarLic] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have driving licence."); if(JobWorking[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You already working. Use /stopwork if you don't want to work anymore."); if(IsPlayerConnected(playerid)) { if(!AdminDuty[playerid]) { if(PlayerInfo[playerid][pJob] == 5) { if(IsPlayerInRangeOfPoint(playerid, 4, Job[5][X], Job[5][Y], Job[5][Z])) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { JobVehicle[playerid] = CreateVehicle(448, Pos[0], Pos[1], Pos[2], 90.0000, -1, -1, -1); PutPlayerInVehicleEx(playerid, JobVehicle[playerid], 0); Gas[JobVehicle[playerid]] = 100; JobWorking[playerid] = 1; } else return SCM(playerid, -1, "Nu poti folosi comanda intr-un vehicul."); } } } } return 1; } Edited August 24, 2017 by RedGun Quote
Un4m3d_Hokage Posted August 24, 2017 Posted August 24, 2017 (edited) la OnPlayerEnterVehicle if(JobVehicle[play erid] != vehicleid) { RemovePlayerFromVehicle(playerid); } Edited August 24, 2017 by Un4m3d_Hokage Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.