Creating a jobs
#4

Example of what you can do.

static gTeam[MAX_PLAYERS];
Under Script includes.
Example:
Код:
// Script Includes
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#pragma tabsize 0

static gTeam[MAX_PLAYERS];
Make sure you define the team!
#define TEAM_POLICE
Place this somewhere bellow the Script includes!

Also put this under request class
"SetPlayerTeamFromClass(playerid)"
Example:
Код:
public OnPlayerRequestClass(playerid, classid)
    SetPlayerTeamFromClass(playerid)"
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
Example of a setting a team:
Код:
SetPlayerTeamFromClass(playerid)
{
 	if (GetPlayerTeam(playerid) == 1)
	{
		gTeam[playerid] = TEAM_UNEMPLOYED;
	}
	if (GetPlayerTeam(playerid) == 2)
	{
	  gTeam[playerid] = TEAM_PILOTS;
	}
}
Hope this help's.
Reply


Messages In This Thread
Creating a jobs - by crunch112 - 31.01.2009, 23:47
Re: Creating a jobs - by Auto-Sized - 01.02.2009, 00:00
Re: Creating a jobs - by crunch112 - 01.02.2009, 00:05
Re: Creating a jobs - by [4k]Wang - 01.02.2009, 00:10
Re: Creating a jobs - by crunch112 - 01.02.2009, 00:10
Re: Creating a jobs - by crunch112 - 01.02.2009, 00:12
Re: Creating a jobs - by smallo - 01.02.2009, 00:13
Re: Creating a jobs - by [4k]Wang - 01.02.2009, 00:14
Re: Creating a jobs - by crunch112 - 01.02.2009, 00:15
Re: Creating a jobs - by Auto-Sized - 01.02.2009, 00:15

Forum Jump:


Users browsing this thread: 3 Guest(s)