Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(new x = 0; x < sizeof(VehicleInfo); x++)
- {
- if(VehicleInfo[x][vehCarID] == newcar)
- {
- new strr[128], id;
- new Float:slx, Float:sly, Float:slz;
- if(PlayerInfo[playerid][pMember] == VehicleInfo[x][vehGroup]) { }
- else
- {
- if(AdminDuty[playerid] == 1)
- {
- format(strr,sizeof(strr),"This %s (model %d, ID %d) is locked to group %s (%d).",aVehicleNames[GetVehicleModel(VehicleInfo[x][vehCarID]) - 400],GetVehicleModel(VehicleInfo[x][vehCarID]),VehicleInfo[x][vehCarID],DynamicFactions[VehicleInfo[x][vehGroup]][fName], VehicleInfo[x][vehGroup]);
- SendClientMessage(playerid, COLOR_WHITE, strr);
- }
- else
- {
- RemovePlayerFromVehicle(playerid),ClearAnimations(playerid);
- GetPlayerPos(id, slx, sly, slz);
- SetPlayerPosEx(id, slx, sly, slz+5.0);
- format(strr,sizeof(strr),"This vehicle is locked to group %s.",DynamicFactions[VehicleInfo[x][vehGroup]][fName]);
- SendClientMessage(playerid, COLOR_WHITE, strr);
- }
- return 1;
- }
- if(VehicleInfo[x][vehRank] != 0)
- {
- if(PlayerInfo[playerid][pRank] < VehicleInfo[x][vehRank])
- {
- if(AdminDuty[playerid] == 1)
- {
- format(strr,sizeof(strr),"This %s (model %d, ID %d) is locked to group %s (%d).",aVehicleNames[GetVehicleModel(VehicleInfo[x][vehCarID]) - 400],GetVehicleModel(VehicleInfo[x][vehCarID]),VehicleInfo[x][vehCarID],DynamicFactions[VehicleInfo[x][vehGroup]][fName],VehicleInfo[x][vehGroup]);
- SendClientMessage(playerid, COLOR_WHITE, strr);
- }
- else
- {
- RemovePlayerFromVehicle(playerid), ClearAnimations(playerid);
- GetPlayerPos(id, slx, sly, slz), SetPlayerPosEx(id, slx, sly, slz+5.0);
- format(strr,sizeof(strr),"You need rank %d to drive this car.",VehicleInfo[x][vehRank]);
- SendClientMessage(playerid, COLOR_WHITE, strr);
- }
- return 1;
- }
- }
- if(VehicleInfo[x][vehJob] != 0)
- {
- if(AdminDuty[playerid] != 0)
- {
- format(strr,sizeof(strr),"This %s (model %d, ID %d) is locked to job %d.",aVehicleNames[GetVehicleModel(VehicleInfo[x][vehCarID]) - 400],GetVehicleModel(VehicleInfo[x][vehCarID]),VehicleInfo[x][vehCarID],VehicleInfo[x][vehJob]);
- SendClientMessage(playerid, COLOR_WHITE, strr);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement