Help with jobs.
#1

Well i found this job include and i decided to put it in my gamemode. No errors or warnings but how do i make it so that if they are job 1 and they are logged in they automatically spawn as TEAM_COP?

Here's what i got so far ( OnPlayerSpawn ) :

pawn Код:
if(GetPlayerJobID(playerid) == 1)
    {
        SetPlayerSkin(playerid,skincop);
    }
That just changes them to the skin, I don't want that, i want it to MAKE them go into the gTeam TEAM_POLICE

How do i do this? ( if there are any problems with the script i'm showing you now, please change in a reply)
Reply
#2

SetPlayerTeam(playerid, TEAM_POLICE);
Reply
#3

Quote:
Originally Posted by brett7
SetPlayerTeam(playerid, TEAM_POLICE);
Does that FORCE them into spawn right away as TEAM_POLICE? or does it just set them to the team?
Reply
#4

i think it just sets them then you could SpawnPlayer(playerid);
Reply
#5

I need it to force them in on spawn !
Reply
#6

does anybody know how to force it or should this work ?

pawn Код:
if(GetPlayerJobID(playerid) == 1)
{
    SetPlayerTeam(playerid,TEAM_POLICE);
    SpawnPlayer(playerid);
return 1;
}
Reply
#7

Omg Tested the script above and when i choose any class it just KEEPS spawning.

How to fix? do i have to add a function like this to my gClass's?

pawn Код:
if(GetPlayerJobID(playerid) == 1)
{
SendClientMessage(playerid,COLOR_GREEN,"You are a cop, choose the cop skin!");
else }
kick(playerid);
(I have not added/tested this script, i'm 100% sure it does NOT work) can anybody post a script ?

I use the normal gClasses from the 'How to make a TDM' tutorial.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)