21.01.2011, 16:12
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(RandomVehicles[0] <= vehicleid <= RandomVehicles[1] && ispassenger==0)
{
if(Team[playerid] == 1 || Team[playerid] == 2)
{
SendClientMessageToAll(RED,"Someone is entering a vehicle.");
}
}
return 1;
}
It is sending the message to all (ofc), but how do I make it send only for these 2 Teams ?
pawn Код:
if(Team[playerid] == 2)//Guards
{
HideMenuForPlayer(mainmenu, playerid);
SetPlayerColor(playerid, BLUE);
SetPlayerTeam(playerid, 2);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 25, 300);
SetPlayerPos(playerid, 826.0, -2073, 12.9);
}
pawn Код:
if(Team[playerid] == 4)//Cops
{
HideMenuForPlayer(mainmenu, playerid);
SetPlayerColor(playerid, GREEN);
SetPlayerTeam(playerid, 4);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
GivePlayerWeapon(playerid, 24, 100);
SetPlayerPos(playerid, 833, -1761, 13.6);
}