teams
#10

here u have AND READ ALL COMMENTS!!! THAT I WRITE! To add more skins/classid's you msut go in debug mode and type /save, than go to ur sa:mp Directory and Open ''savedpositions.txt'' file there will be all saved, your placed cars ,skins...

here u have TEAMS and i am telling u again read the comments

Code:
#include <a_samp>

// IMORTANT !!! COLORS!!

#define blue 0x375FFFFF
#define red 0xFF0000AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define blue1 0x2641FEAA
#define lightblue 0x33CCFFAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN1 0x33AA33AA
#define COLOR_BROWN 0xA52A2AAA

//----------------------------------------------

//YOUR 2 TEAMS
#define TEAM_DEFEND 0
#define TEAM_ATTACK 1

new gTeam[MAX_PLAYERS];

// LEAVE THIS IS JUST FOR NEW ''PUBLIC'' CALLBACK
// CALLBACK IS ALL WHAT HAVE BEFORE ''PUBLIC'' EXAMPLE: public OnPlayerSpawn(playerid),public OnGameModeExit() more and more
forward SetPlayerToTeamColor(playerid);

//-------------------------------------------------------------

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here"); // TYPE IN WHAT U WANT
	print("----------------------------------\n");
}

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script"); // TYPE IN WHAT U WANT
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); // THIS IS CLASSID 0 // ADDMORE CLASSES HERE,GO IN DEBUG CHOSE CLASS AND /SAVE IT WILL SAVE THEM IN ''savedpostions'' in ur sa:mp directory
  AddPlayerClass(280, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);// THIS IS CLASSID 1 //
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{

SetPlayerTeamFromClass(playerid, classid);

SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); // class selelction where will player stand when u will chosign skin
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); // where will camera stay
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); // and where will camera look at THIS and COORDS for ''SetPlayerPos'' Should be same

if(classid == 0 || classid == 1 || classid == 2) { // add ur OWN SKINS and classid
		GameTextForPlayer(playerid,"~b~POLICE OFFICER~n~~g~POLICE OFFICER",3000,5);
	} else if(classid == 3 || classid == 4) {
	  GameTextForPlayer(playerid,"~b~COUNTRY SHERIFF~n~~g~POLICE OFFICER",3000,5);
	} else if(classid == 5) {
	  GameTextForPlayer(playerid,"~b~POLICE SPECIAL UNIT~n~~g~POLICE OFFICER",3000,5);
	} else if(classid == 6) {
	  GameTextForPlayer(playerid,"~b~S.W.A.T. TEAM~n~~g~POLICE OFFICER",3000,5);
	} else if(classid == 7) {
	  GameTextForPlayer(playerid,"~b~F.B.I. AGENT~n~~g~POLICE OFFICER",3000,5);
	}
return 1;
}

// THIS CALLBACK ''SetPlayerToTeamColor(playerid) Will made this,Who Will chose team DEFEND he will be BLUE COLOR
// AND WHO WILl CHOSE TEAM ATTACK WILL BE RED COLOR,YOU CAN CHANGE TEAM COLORS JUST FROM ''COPY AND PASTE'' FROM TOP OF
// SCRIPT WHERE I WRITE U ''COLORS''
public SetPlayerToTeamColor(playerid)
{
	if(gTeam[playerid] == TEAM_DEFEND)
	{
		SetPlayerColor(playerid,0x375FFFFF); // THIS IS COLOR BLUE! THANKS TO (#define blue 0x375FFFFF)
	}
	if(gTeam[playerid] == TEAM_ATTACK)
	{
		SetPlayerColor(playerid,0xFF0000AA); // THIS IS COLOR RED! THANKS TO (#define red 0xFF0000AA)
	}
}
// THIS IS PUTTING CLASSID IN DIFFERENT TEAM IF U WILL CHOSE CLASSID 0 YOU WILL BE IN TEAM ''DEFEND'' OR IF YOU WILL
// CHOSE CLASSID 1 YOU WILL BE IN TEAM ''ATTACK''
// 1 NEW SKIN = 1 CLASS ID
SetPlayerTeamFromClass(playerid, classid)
{
  if(classid == 0)
	{
		gTeam[playerid] = TEAM_DEFEND;
	}
	if(classid == 1)
	{
	  gTeam[playerid] = TEAM_ATTACK;
	}
	return 1;
}
public OnPlayerConnect(playerid)
{
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
	SetPlayerToTeamColor(playerid);
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
and go to ''******.com'' and inside write ''sa:mp wiki'' press ''search'' it will find u their page,there u can learn alot about learning pawno,and go to ******* and watch videos... www.*******.com and type in ''how to script sa:mp server'' or something like that

now u can do with code what ever u want

Have A Nice Day!

EDIT: JUST COPY AND PASTE THIS SCRIPT to your NEW pawno script delete all in ur NEW script and post this the last post that i give u , there is no errors and nothing and it should work,and go to ''sa:mp'' wiki there u will learn much and watch videos on ******* about scripting sa:mp server
Reply


Messages In This Thread
teams - by PANNA - 17.12.2009, 14:01
Re: teams - by LarzI - 17.12.2009, 14:28
Re: teams - by Lajko1 - 17.12.2009, 14:31
Re: teams - by PANNA - 17.12.2009, 15:09
Re: teams - by Lajko1 - 17.12.2009, 15:21
Re: teams - by PANNA - 18.12.2009, 17:37
Re: teams - by Lajko1 - 18.12.2009, 17:42
Re: teams - by PANNA - 18.12.2009, 17:56
Re: teams - by PANNA - 18.12.2009, 18:05
Re: teams - by Lajko1 - 18.12.2009, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)