There are some problem in my new vehicle system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: There are some problem in my new vehicle system (
/showthread.php?tid=317134)
There are some problem in my new vehicle system -
Soap_MacTavish - 10.02.2012
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
Код:
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;
}
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
Код:
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");
}
}
Someone can tell me what's wrong?and how to deal with it.
Sorry for my bad English
Re: There are some problem in my new vehicle system -
N0FeaR - 10.02.2012
What error you get?
Re: There are some problem in my new vehicle system -
Soap_MacTavish - 10.02.2012
Quote:
Originally Posted by N0FeaR
What error you get?
|
No..it compiled success.But some BUG in sever.
All vehicle become sale vehicle
Respuesta: There are some problem in my new vehicle system -
nemanjatesic - 10.02.2012
please see "public IsASalesVehicle"
Re: Respuesta: There are some problem in my new vehicle system -
Soap_MacTavish - 10.02.2012
Quote:
Originally Posted by nemanjatesic
please see "public IsASalesVehicle"
|
sorry..i cannot find any mistake..