Some qestions...
#1

1.Guys how i can send a message to a specific skin.For example when someone type /medic then a message will be send to all players who have medic skin(275) .

2.How can eject a player from a police car if he dont have police skin(282) and the same with ambulance(275)?
Reply
#2

1. You can SendClientMessage for the playerid who are in the team of Medic or add a check like this for the skin.
pawn Код:
for(new i=0;i<=MAX_PLAYERS;i++) // TEAM METHOD
{
    if(gTeam[i] == TEAM_MEDIC )
   {
        // ADD YOUR CODE OVER HERE
   }
}
pawn Код:
for(new i=0;i<=MAX_PLAYERS;i++) // SKIN METHOD
{
    if(GetPlayerSkin[i] == SKINIDYOUWANTTOCHECK)
    {
          SendClientMessage(i,COLOR_WHITE,"Your Checked!");
    }
}
2. Use this under OnPlayerUpdate
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 275 || (GetVehicleModel(GetPlayerVehicleID(playerid)) == ENTERPOLICECARID)
    {
          if(GetPlayerSkin(playerid) != ENTERSKINIDYOUWANT) return RemovePlayerFromVehicle(playerid);
    }
}
Reply
#3

ok thanks +1
Reply
#4

Ahh I was too testing a code for you for the first one.. :\

Код:
if (GetPlayerSkin(playerid == 275))
	{
	SendClientMessage(playerid, COLOR_RED, "You are medic! :D");
 	}
	return 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)