10.02.2012, 06:38
I find a new way to add more vehicle in LARP
set all of the vehicles become ownable.and than
when the owner is FBI,COP,GANG_one..they can be driven by members.(it look so stupid?)
But there still some problem:
like this
If you wanna add more vehicle,just re-edit "vehicle.cfg"
But when i join my sever.I found that vehicles of the whole sever are sales vehicles..what the hell
Every vehicles are on sale
Someone can tell me what's wrong?and how to deal with it.
Sorry for my bad English
set all of the vehicles become ownable.and than
when the owner is FBI,COP,GANG_one..they can be driven by members.(it look so stupid?)
But there still some problem:
like this
Код:
public IsASalesVehicle(vehicleid) { if(strcmp(CarInfo[vehicleid][cOwner], "SALE", true) == 0) { return 1; } return 0; } public IsACopCar(carid) { if(strcmp(CarInfo[carid][cOwner], "LSPD", true) == 0) { return 1; } return 0; } public IsAnOwnableCar(vehicleid) { if(vehicleid >= 184 && vehicleid <= MAX_VEHICLES) { return 1; } return 0; }
But when i join my sever.I found that vehicles of the whole sever are sales vehicles..what the hell
Every vehicles are on sale
Код:
if(IsASalesVehicle(newcar)) { SendClientMessage(playerid, COLOR_GREY, "Sales vehicle,if you wanna buy, get to the Co-pilot seat and type/v buy"); SafeRemovePlayerFromVehicle(playerid); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~w~Welcome, type ~b~/v buy ~w~to buy this car, or ~b~/exit~w~ if you don't wanna buy it!",10000,4); } else if (IsAnAmbulance(newcar)) { if(PlayerInfo[playerid][pMember]== 4 && JobDuty[playerid] == 1 || PlayerInfo[playerid][pLeader]== 4 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { } else { SafeRemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, "** You must be a medical"); } } else if (IsACopCar(newcar)) { if(IsAFreecop(playerid) && PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pMember]== 1 && PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pLeader]== 1 ||PlayerInfo[playerid][pMember]== 2|| PlayerInfo[playerid][pLeader]== 2 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { } else { SafeRemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_LIGHTBLUE, "** You must be a cop"); } }
Sorry for my bad English