SA-MP Forums Archive
Disable Vehicle - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Disable Vehicle (/showthread.php?tid=109106)



Disable Vehicle - addysnow1 - 17.11.2009

Yo!,
I made a fuction so ppl cannot drive in Sultans and Elegys and Interfus when this doesnt have enought dirft points
look at it:
Код:
public Startup(playerid, vehicleid)
{

if(GetVehicleModel(vehicleid) == 476 || GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 447 || GetVehicleModel(vehicleid) == 469 || GetVehicleModel(vehicleid) == 432) //sultan
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You cannot drive this vehicle!");
}
if(GetVehicleModel(vehicleid) == 560) //sultan
{
if(PlayerInfo[playerid][pLawSkill] != 7000) {
//vehicleEntered[playerid][vehicleid] = true;
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't drive in a sultan yet! You need drift level 5!");
}
}
if(GetVehicleModel(vehicleid) == 562) //sultan
{
if(PlayerInfo[playerid][pLawSkill] != 4000) {
//vehicleEntered[playerid][vehicleid] = true;
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't drive in a Elegy yet! You need drift level 3!");
}
}
if(GetVehicleModel(vehicleid) == 411) //sultan
{
if(PlayerInfo[playerid][pLawSkill] != 2500) {
//vehicleEntered[playerid][vehicleid] = true;
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can't drive in this car yet! You need drift level 2!");
}
}
return 1;
}
Its from the GodFather
It also doesnt works in OnPlayerEnterVehicle
what I need to change?
btw: it works before i putted the Cars Spawns from Samp Common include...


Re: Uhm, WTF!? - Streetplaya - 17.11.2009

Keep your GODDAMN Godfather topics in the GODDAMN Godfather topic


Re: Uhm, WTF!? - pagie1111 - 17.11.2009

Try putting this at the top of it

vehicleid = GetPlayerVehicleID(playerid);


Re: Uhm, WTF!? - Peter_Corneile - 17.11.2009

Use a proper subject for your topic


Re: Uhm, WTF!? - addysnow1 - 17.11.2009

Quote:
Originally Posted by MaVe - leeturl.de
Keep your GODDAMN Godfather topics in the GODDAMN Godfather topic
Dude its a GodFather Script but I dont ask about fuctions from the GodFather!