09.11.2009, 18:48
Hi all!
For those who dont know how to, Im going to teach you to make gangs and teams!
Open up pawno and start new file.
You will get a blank script.
Put this somewhere near the top of your script:
Under OnGameModeInIt()
Now, go to this website and choose some skins, its up to you...
Ok, i will choose skins 16 and skin 174
Do this with your OnGameModeInIt:
Ok, so you have the skins set up!
Under OnPlayerRequestClass:
Now... After OnPlayerRequestClass:
And thats it! I hope you found this tutorial helpful! More comming soon!
Note: Plz be kind, this is my first tutorial! And plz leave good comments.
For those who dont know how to, Im going to teach you to make gangs and teams!
Open up pawno and start new file.
You will get a blank script.
Put this somewhere near the top of your script:
pawn Код:
new gTeam[MAX_PLAYERS];
#define TEAM_WORKERS 1
#define TEAM_AGENTS 2
Under OnGameModeInIt()
pawn Код:
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
Ok, i will choose skins 16 and skin 174
Do this with your OnGameModeInIt:
pawn Код:
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(16, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(174, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
Under OnPlayerRequestClass:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1541.2833, -1362.4741, 329.6457);//You can change these to your co-ordinates, read wiki for more info!
SetPlayerFacingAngle(playerid, 360);
SetPlayerCameraLookAt(playerid,1541.2833, -1362.4741, 329.6457);
SetPlayerCameraPos(playerid,1540.8374,-1358.4910,329.4645);
SetPlayerTeamFromClass(playerid, classid);//Add this line to the end!
return 1;
}
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_WORKERS;
SetPlayerTeam(playerid,TEAM_WORKERS);//You can delete this line if you want to allow team killing...
GameTextForPlayer(playerid,"~g~Workers",10,0);
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_AGENTS;
SetPlayerTeam(playerid,TEAM_AGENTS);//Same for this!
GameTextForPlayer(playerid,"~r~Agents",10,0);
}
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(GetPlayerTeam(playerid) == TEAM_AGENTS)
{
SetPlayerPos(playerid,-2136.3921,-124.4632,36.5191);//Chnage this to the spawnpoint of your Agents Team!
SetPlayerHealth(playerid,100);
}
else if(GetPlayerTeam(playerid) == TEAM_WORKERS)
{
SetPlayerHealth(playerid,100);
SetPlayerPos(playerid,-2016.3192,130.2446,27.6875);//Chnage this to the spawnpoint of your Workers Team!
}
}
return 1;
}
Note: Plz be kind, this is my first tutorial! And plz leave good comments.