#1

Okay well on my gamemode I am extremely puzzled on this bit. I want to make it so when the players spawn as a civilian, they pick their job by a menu. I've already made the menu but how do I make it so when they choose a job, it sets them on a team and spawns them where the team should spawn?

Is there a SetPlayerOnTeam function or something similar to that?
Reply
#2

you probably want SetPlayerTeam(playerid,team);
Reply
#3

Quote:
Originally Posted by matdav
you probably want SetPlayerTeam(playerid,team);
Thank you so much. Can't believe I didn't see it in the functions list in pawno. :S
Reply
#4

Why are you using teams for a Job lol? Make a variable.
Reply
#5

Quote:
Originally Posted by Abernethy
Why are you using teams for a Job lol? Make a variable.
I also have commands and areas for each job but how would I make a variable for each job?
Reply
#6

Above OnGameModeInit:
Код:
new JobCop[MAX_PLAYERS];
when they select the job of "Cop" add to the script:

Код:
JobCop[playerid] = 1;
any commands they use, use this:

Код:
if(JobCop[playerid] == 1)
{
//Enter script
return 1;
}
when they leave that job:

Код:
JobCop[playerid] = 0;
Change Cop to any job you have. Also for every job you make use in OnPlayerConnect:

Код:
JobCop[playerid] = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)