Yet another gTeam question.
#1

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
Reply
#2

Do you have gteam defines in your script? If yes please post here. Also please tell which cmd processor you use.
Reply
#3

I do, and I use the one that has CMD: I forget the name, and I am not home ATM xD Sorry.
Reply
#4

Hmm ok when you come back to home just post team defines and yeah it's zcmd .
Reply
#5

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
Reply
#6

@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.
Reply
#7

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
Reply
#8

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...
Reply
#9

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)