Scripting question [Rep +1] - 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: Scripting question [Rep +1] (
/showthread.php?tid=331082)
Scripting question [Rep +1] -
MichaelProPlayer - 03.04.2012
Hello,I need help.I want to make a script like this one:
if player using COLOR_YELLOW and if he is in a car (SFPD Police car ID:597) then he will automatically get out of the car.
Can anyone help

I know its a very easy question and I am a noob so sorry for adding a useless thread.....Anyway Please help

Re: Scripting question [Rep +1] -
MichaelProPlayer - 03.04.2012
Can anybody please
Re: Scripting question [Rep +1] -
Yordan_Kronos - 03.04.2012
First You cant give +Rep
Second you need from factions vehicles
Re: Scripting question [Rep +1] -
blank. - 03.04.2012
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerColor(playerid) == COLOR_YELLOW && GetVehicleModel(GetPlayerVehicleID(playerid)) == 597)
{
RemovePlayerFromVehicle(playerid);
}
}
}
Re: Scripting question [Rep +1] -
sjvt - 03.04.2012
DELETED, blank was first
Re: Scripting question [Rep +1] -
MichaelProPlayer - 03.04.2012
No teams its just if any player using COLOR_YELLOW then he can't drive that car....
Re: Scripting question [Rep +1] -
sjvt - 03.04.2012
Quote:
Originally Posted by MichaelProPlayer
No teams its just if any player using COLOR_YELLOW then he can't drive that car.... 
|
Look blank code..
Re: Scripting question [Rep +1] -
MichaelProPlayer - 03.04.2012
Quote:
Originally Posted by blank.
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerColor(playerid) == COLOR_YELLOW && GetVehicleModel(GetPlayerVehicleID(playerid)) == 597) { RemovePlayerFromVehicle(playerid); } } }
|
Sorry but i am getting 1 error.Can please someone help me....Please
Re: Scripting question [Rep +1] -
blank. - 03.04.2012
Do you have the color yellow defined?
If not;
pawn Код:
#define COLOR_YELLOW 0xFFFF00FF
Put that on top of your code.
Re: Scripting question [Rep +1] -
MichaelProPlayer - 03.04.2012
thanks all of you its finally working