OnPlayerEnterVehicle if if if { } problems
#1

Hello,

Im trying to make this;

When you enter a pd car as a cop (copskin) a message show up
when you enter the pd car as a civillian another message shows up
But..if you enter the pd car as a civillian being a 'passenger' some 'other' 'different' message shows up XD

This is what i have i changed several times changing the {or } and putting codes in another order but still nothing happens
I need some help here please;
Код:
  if(GetVehicleModel(vehicleid) == 598) //LVPD
  {
  new copskin = GetPlayerSkin(playerid);
  	new currentState = GetPlayerState(playerid);
	if (currentState == PLAYER_STATE_DRIVER)
	{
  if( (copskin == 287) || (copskin == 163) || (copskin == 282) || (copskin == 255) || (copskin == 165))
  	
  {
  
  	SendClientMessageToSkin(282, 0x0000FF96, "lvpd cop hitting the road");
  }
  	else
	{
	
	SendClientMessage(playerid,0x80008096, "your the none cop driver");
  	//SendClientMessageToSkin(282, 0x0000FF96, "DISPATCH: Someone enters a lvpd vehicle!");
	}
}

 }
	return 1;
}
Reply
#2

Replace with:
Код:
if(copskin == 287 || copskin == 163 || copskin == 282 || copskin == 255 || copskin == 165)
And how is ''SendClientMessageToSkin'' defined?
Reply
#3

Hiermee
dat zit verder wel goed;

(with this;..but that should be okay)

Код:
public SendClientMessageToSkin(skin, color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerSkin(i) == skin)
{
SendClientMessage(i, color, string);
}
}
}
Reply
#4

this topic is dead already
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)