Salut, am incercat sa fac comanda /work insa nu stiu cum pot face ca masina de la job care i-a creat-o cand a folosit /work adica JobVehicle[playerid] sa o poata folosi doar el, atunci cand alt jucator da F/ENTER la masina respectiva sa ii apare ca e incuiata, doar jucatorul proprietar al masini de la job sa aiba acces de F/ENTE in ea, ma puteti ajuta?
Comanda este aceasta:
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;
}
Question
Rayan
Salut, am incercat sa fac comanda /work insa nu stiu cum pot face ca masina de la job care i-a creat-o cand a folosit /work adica JobVehicle[playerid] sa o poata folosi doar el, atunci cand alt jucator da F/ENTER la masina respectiva sa ii apare ca e incuiata, doar jucatorul proprietar al masini de la job sa aiba acces de F/ENTE in ea, ma puteti ajuta?
Comanda este aceasta:
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; }17 answers to this question
Recommended Posts