Small Help
#1

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);
    }
Reply


Messages In This Thread
Small Help - by marinov - 21.01.2011, 16:12
Re: Small Help - by Vince - 21.01.2011, 16:16
Re: Small Help - by [WF]Demon - 21.01.2011, 16:17
Re: Small Help - by marinov - 21.01.2011, 16:19

Forum Jump:


Users browsing this thread: 2 Guest(s)