SA-MP Forums Archive
Nos - 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 (/showthread.php?tid=65199)



Nos - LibertyWorld - 10.02.2009

Did i do it right?

Doesnt give errors.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid;
    if(newstate == PLAYER_STATE_DRIVER)
    if(!IsPlayerInInvalidNosVehicle(playerid,vehicleid))
    {
    AddVehicleComponent(vehicleid,1010);
    }
return 1;
}



Re: Nos - MenaceX^ - 10.02.2009

Test it? ><


Re: Nos - LibertyWorld - 10.02.2009

No errors, but doesnt give nitro.

Does anyone know how to fix.


Re: Nos - mirkoiz - 10.02.2009

Edit:

Just Copy from me...

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
   new vehicleid = GetPlayerVehicleID(playerid);
	if(newstate == PLAYER_STATE_DRIVER)
	if(!IsPlayerInInvalidNosVehicle(playerid,vehicleid))
	{
	AddVehicleComponent(vehicleid,1010);
	}
return 1;
}
Why?

Simple.. you not sayd to your Script .. that the variable "vehicleid" is the Vehicle where the player is in


Re: Nos - LibertyWorld - 10.02.2009

I just did the same thing.

While i was testing you posted


Re: Nos - mirkoiz - 10.02.2009

2 People , 1 Scripting idea


Re: Nos - Think - 10.02.2009

Quote:
Originally Posted by Plato
Edit:

Just Copy from me...

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
   new vehicleid = GetPlayerVehicleID(playerid);
	if(newstate == PLAYER_STATE_DRIVER && !IsPlayerInInvalidNosVehicle(playerid,vehicleid))
	{
	AddVehicleComponent(vehicleid,1010);
	}
return 1;
}
this would be bettah and indent a lil bit -_-

Why?

Simple.. you not sayd to your Script .. that the variable "vehicleid" is the Vehicle where the player is in