Team System - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Team System (
/showthread.php?tid=539190)
Team System -
Jigsaw123 - 26.09.2014
Hey guys.. I wanna make a Team System but for RP server..
Basically when someone registers.. They'll be asked stuff like which team do you want..
I know how to do that.. #define TEAM_AMERICA #define TEAM_RUSSIA etc..
But how do i make it appear in /stats? Like Team: %s?
Respuesta: Team System -
ghost556 - 26.09.2014
This is the way i do it for my jobs in my script, these require to be in the player enum but don't need to be saved on disconnect.
pawn Код:
stock Change(playerid) // Change 'Change' to the name you will use in the /stats
{
new team[30];
switch(PlayerInfo[playerid][pChange]) // Switch it to be with your team system
{
case 0: team = "TEAM 1"; // These all will be the name as the team start with team 0 and work up
case 1: team = "TEAM 2";
case 2: team = "TEAM 3";
case 3: team = "TEAM 4";
}
return team;
}
For the stats command.
pawn Код:
format(coordsstring, sizeof(coordsstring), "Team: %s\n", Change(playerid)); // Change 'Change' to the word you used in the stock ((stock 'word'(playerid)
strcat(string2,coordsstring);