Yet another gTeam question. -
[MM]18240[FMB] - 31.12.2012
Okay, so I ******d it, and found nothing but irrelevance.
How can I make it so that RCON Admins can set someones team with /setteam <Team ID> <Playerid>, and that player's Team saves so that when they reconnect they are back in their team? Thanks in advance, and I will be sure to put you in my credits aswell as Rep+ you
Re: Yet another gTeam question. -
RedCrossER - 31.12.2012
Do you have gteam defines in your script? If yes please post here. Also please tell which cmd processor you use.
Re: Yet another gTeam question. -
[MM]18240[FMB] - 31.12.2012
I do, and I use the one that has CMD: I forget the name, and I am not home ATM xD Sorry.
Re: Yet another gTeam question. -
RedCrossER - 31.12.2012
Hmm ok when you come back to home just post team defines and yeah it's zcmd .
Re: Yet another gTeam question. -
CrazyJin - 31.12.2012
Quote:
Originally Posted by [MM]18240[FMB]
I do, and I use the one that has CMD: I forget the name, and I am not home ATM xD Sorry.
|
About your Question, you need to script OnPlayerLeave that Group will save
+Rep me if i help
Re: Yet another gTeam question. -
[MM]18240[FMB] - 03.01.2013
@CrazyJin - Maybe an Example?
pawn Код:
// Define the teams so its easier to use later
#define TEAM_Civilian 0
#define TEAM_SANews 1
#define TEAM_Administrators 2
// Define the colours you want each team to be, its easier for later on
#define TEAM_Civilian_COLOR 0x0000BBAA // blue duh
#define TEAM_SANews_COLOR 0x33AA33AA // green duh
#define TEAM_Administrators_COLOR 0x00AA33AA
// Tracks what team a player is in
new gTeam[MAX_PLAYERS];
All I have so far.
Re: Yet another gTeam question. -
mastermax7777 - 03.01.2013
how do u save ur player stats .. etc
save it using file function (dini,y_ini.. etc) or mysql
on player connect check if name matches the player which u saved and if does then assign him a team.. dont ask me how to save player stats ****** for it
Re: Yet another gTeam question. -
[MM]18240[FMB] - 03.01.2013
I save my Player stats in MySQL.
I just need to know how to make a command to assign a gTeam, and how I can save them. I am willing to save the gTeams in MySQL, or .ini...
AW: Yet another gTeam question. -
Blackazur - 03.01.2013
Maybe:
Код:
COMMAND:setteam(playerid,params[])
{
new id, team;
if(sscanf(params,"dd",id,team)) return SendClientMessage(playerid,COLOR_RED,"Usage: /setteam <id> <2=Human/1=Zombie>");
if(PlayerAdmin[playerid] < 3) return SendClientMessage(playerid,COLOR_RED,"You must be an admin.");
if(team < 1 || team > 2) return SendClientMessage(playerid,COLOR_RED,"Teams between 1 and 2!"); //you can make your teamammount here.
gTeam[playerid] = team;
SpawnPlayer(id);
format(str,144,"You set %ss Team to %d.",PlayerName[playerid],gTeam[id],team);
SendClientMessage(playerid,COLOR_LIGHTBLUE,str);
return 1;
}
But i think not that it works, when you use MYSQL.
Re: Yet another gTeam question. -
[MM]18240[FMB] - 03.01.2013
I'll edit that code, that code should work, but now just to get a way to save it. I will try to find a way to save the gTeam.. But for now, I can add that useful tidbit from your GM. Thanks for sharing.