Scripting question [Rep +1]
#1

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
Reply
#2

Can anybody please
Reply
#3

First You cant give +Rep
Second you need from factions vehicles
Reply
#4

pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
        {
        if(GetPlayerColor(playerid) == COLOR_YELLOW && GetVehicleModel(GetPlayerVehicleID(playerid)) == 597)
            {
            RemovePlayerFromVehicle(playerid);
            }
       
        }
    }
Reply
#5

DELETED, blank was first
Reply
#6

No teams its just if any player using COLOR_YELLOW then he can't drive that car....
Reply
#7

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..
Reply
#8

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
Reply
#9

Do you have the color yellow defined?
If not;
pawn Код:
#define COLOR_YELLOW 0xFFFF00FF
Put that on top of your code.
Reply
#10

thanks all of you its finally working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)