GetPlayerTeam [Help]
#2

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 425)
    {
        if(GetPlayerScore(playerid) < 2000 && GetPlayerTeam(playerid) != 9)
        {
        	SetVehicleParamsForPlayer(vehicleid, playerid, false, true);
            SendClientMessage(playerid, 0xFF0000FF, "You must be in team army and must have the score 2000 to drive a Hunter!");
		}
    }
    return 1;
}
A simple command:

Код:
new team_names[][] =
{
"Team0 name",
"Team1 name",
"Team2 name",
"Team3 name"//and so on
};

CMD:myteam(playerid,params[])
{
	new team = GetPlayerTeam(playerid);//store the player's team
	new str[32];
	format(str,32,"Your team is: %s",team_names[team]);
	SendClientMessage(playerid,0,str);
	return 1;
}
Reply


Messages In This Thread
GetPlayerTeam [Help] - by Sting. - 19.07.2017, 16:52
Re: GetPlayerTeam [Help] - by Rolux - 19.07.2017, 17:11
Re: GetPlayerTeam [Help] - by Paulice - 19.07.2017, 17:16
Re: GetPlayerTeam [Help] - by Sting. - 19.07.2017, 17:26
Re: GetPlayerTeam [Help] - by Paulice - 19.07.2017, 17:28
Re: GetPlayerTeam [Help] - by Kane - 19.07.2017, 17:31
Re: GetPlayerTeam [Help] - by Rolux - 19.07.2017, 17:31
Re: GetPlayerTeam [Help] - by Sting. - 19.07.2017, 17:38
Re: GetPlayerTeam [Help] - by Rolux - 19.07.2017, 18:13
Re: GetPlayerTeam [Help] - by Sting. - 20.07.2017, 08:44

Forum Jump:


Users browsing this thread: 1 Guest(s)