Asking a thing...
#1

Hello guys,since im developing a cops&robbers gamemode,i need help with a thing.

I need to save the team choose the FIRST time when a player spawn,and after he quit and rejoin,he cant select other teams except the first selected...how to ?
Reply
#2

how are you saving and loading your data?? ini, djson, mysql?

if your good at scripting then a basic instruction is all ya need so ill try,

I would set a flag when a player goes to register,
something like:

in the gamemode under the includes and above any callbacks use
pawn Код:
new bool:Player_Can_Select_Team[MAX_PLAYERS];
then in the code block you have setup for when they register
add
pawn Код:
Player_Can_Select_Team[playerid]=true;

then do a simple check before letting them select a team


pawn Код:
if(Player_Can_Select_Team[playerid]){
    Player_Can_Select_Team[playerid] = false;
     // select team code here
}

the idea is this happens when they reg, after they reg they have a flag set to select a team,
otherwise they must use there current team.


now this does not cover setting the team
also does not cover getting the first selected team for an ini,djson,mysql db


hope this helps,
Reply
#3

What type of saving method are you using?
Reply
#4

Quote:
Originally Posted by Haydz
Посмотреть сообщение
What type of saving method are you using?
I use Y_INI.

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
//Cut
Thanks for help but i use Y_INI and i need to setup how..
Reply
#5

bump
Reply
#6

Your better off using mysql for this.
Reply
#7

Quote:
Originally Posted by brett7
Посмотреть сообщение
Your better off using mysql for this.
Well,i started the gm from scratch using Y_INI and i want continue using that.
Reply
#8

bump
Reply
#9

Bump.Any help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)