nos wont come out of the cars ass - 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: nos wont come out of the cars ass (
/showthread.php?tid=71397)
nos wont come out of the cars ass -
CJ101 - 01.04.2009
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys & (KEY_JUMP)) == (KEY_SPRINT))
{
new vehid = GetVehicleModel(playerid);
if (!IsPlayerInInvalidNosVehicle(playerid,vehid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
}
}
return 1;
}
it wont add nos to the vehicle.
Re: nos wont come out of the cars ass -
Kinetic - 01.04.2009
im pretty sure your problem is this line
pawn Код:
if ((newkeys & (KEY_JUMP)) == (KEY_SPRINT))
Re: nos wont come out of the cars ass -
ReV. - 01.04.2009
Use one key either KEY_SUBMISSION or KEY_FIRE..
Re: nos wont come out of the cars ass -
CJ101 - 01.04.2009
+
Re: nos wont come out of the cars ass -
CJ101 - 01.04.2009
EDIIt:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
new vehid = GetVehicleModel(playerid);
if (!IsPlayerInInvalidNosVehicle(playerid,vehid))
{
AddVehicleComponent(vehid,1010);
}
}
return 1;
}
still nothing
Re: nos wont come out of the cars ass -
Pyrokid - 01.04.2009
You're using GetVehicleModel when you're supposed to be using GetPlayerVehicleID.
Re: nos wont come out of the cars ass -
Daren_Jacobson - 01.04.2009
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
new vehid = GetVehicleModel(playerid);
if (!IsPlayerInInvalidNosVehicle(playerid,vehid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
return 1;
}
Re: nos wont come out of the cars ass -
Mikep - 01.04.2009
Ever heard of indentation?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
if(!IsPlayerInInvalidNosVehicle(playerid)) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
return 1;
}
Re: nos wont come out of the cars ass -
yezizhu - 01.04.2009
edit
new vehid = GetVehicleModel(playerid)
to
new vehid = GetPlayerVehicleID(playerid)
Notice it..Someone had shown the error^^
Re: nos wont come out of the cars ass -
Mikep - 01.04.2009
vehid isn't used so you can remove it and IsPlayerInInvalidNosVehicle only has a playerid param.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
if(!IsPlayerInInvalidNosVehicle(playerid)) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
return 1;
}