cars - 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: cars (
/showthread.php?tid=531592)
cars -
Rabea - 13.08.2014
okay, i have vehicle system, when i buy car and relog the id of the car will change i have this code:
Код:
OldCar[playerid] = INVALID_VEHICLE_ID;
i tried to delete, i joined and reloged and the id is the same, but i don't own the vehicle.
anyone can help me?
Re: cars -
Rabea - 13.08.2014
bump
Re: cars -
Rabea - 13.08.2014
Anyone?
Re: cars -
Blademaster680 - 13.08.2014
Код:
OldCar[playerid] = INVALID_VEHICLE_ID;
INVALID_VEHICLE_ID means that there is no vehicle, so in other words is zero. If you wanting the old vehicle id, then onplayerexitvehicle use OldCar[playerid] = GetPlayerVehicleId(playerid);
Re: cars -
Rabea - 13.08.2014
delete this code?
Код:
OldCar[playerid] = INVALID_VEHICLE_ID;
Re: cars -
Don_Cage - 13.08.2014
Show your cmd to buy
Re: cars -
Rabea - 13.08.2014
Код:
CMD:buycar(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsPlayerInRangeOfPoint(playerid, 2, 545.6661,-1292.2437,17.2422)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the vehicles dealership.");
if(PlayerInfo[playerid][pVIP] >= 2)
{
if(PlayerInfo[playerid][vModel] && PlayerInfo[playerid][vVModel] && PlayerInfo[playerid][vBModel])
{
format(string, sizeof(string), "You already own vehicles ID %d and %d.", PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVVeh]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
else ShowDialog(playerid, 10);
return 1;
}
if(PlayerInfo[playerid][vModel])
{
format(string, sizeof(string), "You already own vehicle ID %d.", PlayerInfo[playerid][pVeh]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
ShowDialog(playerid, 10);
return 1;
}
Re: cars -
Rabea - 13.08.2014
Any?
Re: cars -
Rabea - 14.08.2014
....
Re: cars -
Rabea - 14.08.2014
bump, need help !!