SA-MP Forums Archive
HELP|vehicle id's mess up - 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: HELP|vehicle id's mess up (/showthread.php?tid=397598)



HELP|vehicle id's mess up - --LooD-- - 05.12.2012

Problem:
When I bought a car and when I entered into car. Send me a message:
"Ballas" or
"You don't have keys of this vehicle"
...

Pls Help...

I hope you understand ... I'm from Bosnia xD


Re: HELP|vehicle id's mess up - Stefand - 05.12.2012

Show us the code from public Onplayerstatechange


Re: HELP|vehicle id's mess up - --LooD-- - 05.12.2012

Код:
if (newstate == PLAYER_STATE_DRIVER)
{
new lsn = GetPlayerVehicleID(playerid);
if(LsnVozilo(lsn))
{
if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
CanTurnEngine[playerid] = lsn;
}
else
{
RemovePlayerFromVehicle(playerid);
SCM(playerid, ZUTA, "Niste clan Los Santos News-a");//in my language
}
}
if(YakuzaVozila(lsn))
{
if(PlayerInfo[playerid][pClan] == 2 || PlayerInfo[playerid][pLeader] == 2)
{
CanTurnEngine[playerid] = lsn;
}
else
{
RemovePlayerFromVehicle(playerid);
GameTextForPlayer(playerid, "~r~YAKUZA", 1000, 5);
}
}
if(CDVozila(lsn))
{
if(PlayerInfo[playerid][pClan] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
CanTurnEngine[playerid] = lsn;
}
else
{
RemovePlayerFromVehicle(playerid);
GameTextForPlayer(playerid, "Chinese Division", 1000, 5);
}
}
if(LSPDVozila(lsn))
{
if(PlayerInfo[playerid][pClan] == 4 || PlayerInfo[playerid][pLeader] == 4)
{
CanTurnEngine[playerid] = lsn;
}
else
{
RemovePlayerFromVehicle(playerid);
SCM(playerid, BELA, "Nisi clan Los Santos Police Deparment-a");//in my language
}
}
if(GSFVozila(lsn))
{
if(PlayerInfo[playerid][pClan] == 5 || PlayerInfo[playerid][pLeader] == 5)
{
CanTurnEngine[playerid] = lsn;
}
else
{
RemovePlayerFromVehicle(playerid);
GameTextForPlayer(playerid, "~g~Grove Street Family", 1000, 5);
}
}
if(BVozila(lsn))
{
if(PlayerInfo[playerid][pClan] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
CanTurnEngine[playerid] = lsn;
}
else
{
RemovePlayerFromVehicle(playerid);
GameTextForPlayer(playerid, "~p~Ballas", 1000, 5);
}
}

}
and this

Код:
if(newstate == PLAYER_STATE_DRIVER)
{

if(KosacTrave(newcar))
{
if(PlayerInfo[playerid][pPosao]== 1)
{
CanTurnEngine[playerid] = newcar;
}
else
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,1);
SCM(playerid, ZUTA, "Nemate kljuceve od ovog vozila");
}
}

if(Traktor(newcar))
{
if(PlayerInfo[playerid][pPosao]== 1)
{
CanTurnEngine[playerid] = newcar;
}
else
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,1);
SCM(playerid, ZUTA, "Nemate kljuceve od ovog vozila");
}
}
}

if(newstate == PLAYER_STATE_DRIVER)
{
if(VozilaNaProdaju(newcar))
{
SCM(playerid,BELA,"Ovo auto je na prodaju, /kupiauto");
CanTurnEngine[playerid] = 9999;
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(newcar,0,lights,alarm,doors,bonnet,boot,objective);
}
if(MotoriNaProdaju(newcar))
{
SCM(playerid,BELA,"Ovaj motor je na prodaju, /kupimotor");
CanTurnEngine[playerid] = 9999;
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(newcar,0,lights,alarm,doors,bonnet,boot,objective);
}
if(BiciklaNaProdaju(newcar))
{
SCM(playerid,BELA,"Ovaj biciklo je na prodaju, /kupibiciklo");
CanTurnEngine[playerid] = 9999;
GetVehicleParamsEx(newcar,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(newcar,0,lights,alarm,doors,bonnet,boot,objective);
}
}



Re: HELP|vehicle id's mess up - --LooD-- - 06.12.2012

*BUMP*