Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterVehicle(playerid, vehicleid)
- {
- new string[128];
- if(VehInfo[vehicleid][vID] != 0 && VehInfo[vehicleid][vFaction] != 0)
- {
- if(VehInfo[vehicleid][vFaction] != PlayerInfo[playerid][pMember] && VehInfo[vehicleid][vFaction] != 0 && IsACop(playerid) != VehInfo[vehicleid][vFaction])
- {
- format(string, sizeof(string), "Acest vehicul poate fi condus doar de membrii factiunii %s.", NumeFactiune(VehInfo[vehicleid][vFaction]));
- SCM(playerid, COLOR_GREY, string);
- RemovePlayerFromVehicle(playerid);
- SlapPlayer(playerid);
- }
- else
- {
- if(VehInfo[vehicleid][vRank] > PlayerInfo[playerid][pRank])
- {
- format(string, sizeof(string), "Acest vehicul poate fi condus doar de membrii cu rank %d.", VehInfo[vehicleid][vRank]);
- SCM(playerid, COLOR_GREY, string);
- RemovePlayerFromVehicle(playerid);
- SlapPlayer(playerid);
- }
- }
- }
- if(VehInfo[vehicleid][vID] != 0 && VehInfo[vehicleid][vJob] != 0)
- {
- if(VehInfo[vehicleid][vJob] != PlayerInfo[playerid][pJob])
- {
- format(string, sizeof(string), "Acest vehicul poate fi condus doar de cei ce detin job-ul %s.", NumeJob(VehInfo[vehicleid][vJob]));
- SCM(playerid, COLOR_GREY, string);
- RemovePlayerFromVehicle(playerid);
- SlapPlayer(playerid);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement