Guys i need your help here -
[XST]O_x - 06.10.2009
Hey,
I've read
This Tutorial(Hope it works for 0.3),
And i've tried my luck with the SetPlayerTeamFromClass.
Well,i see it didnt go well(Extremely Wrong)
I've searched but i didnt find an answer that satisfying my problem Solution.
Well..The code:
On the top
pawn Код:
#define TEAM_USA 0
#define TEAM_SPAIN 1
#define TEAM_FRANCE 2
#define TEAM_CHINA 3
OnGameModeInit:
pawn Код:
//Area 51 team-USA
AddPlayerClass(287,204.0314,1883.2047,17.6481,359.1003,29,450,30,310,24,535); // A51 Spawn CASE 0
AddPlayerClass(286,204.0314,1883.2047,17.6481,359.1003,29,450,30,310,24,535); // A51 Spawn CASE 1
AddPlayerClass(285,204.0314,1883.2047,17.6481,359.1003,29,450,30,310,24,535); // A51 Spawn CASE 2
//Vilage forces-SPAIN
AddPlayerClass(287,-822.4015,2764.9468,46.0000,184.2325,22,535,33,160,31,270); // Spanish spawn CASE 3
AddPlayerClass(286,-822.4015,2764.9468,46.0000,184.2325,22,535,33,160,31,270); // Spanish spawn CASE 4
AddPlayerClass(285,-822.4015,2764.9468,46.0000,184.2325,22,535,33,160,31,270); // Spanish spawn CASE 5
//Side forces-FRANCE
AddPlayerClass(287,-614.7703,2708.8726,72.3750,179.5655,23,535,26,270,29,353); // French spawn CASE 6
AddPlayerClass(286,-614.7703,2708.8726,72.3750,179.5655,23,535,26,270,29,353); // French spawn CASE 7
AddPlayerClass(285,-614.7703,2708.8726,72.3750,179.5655,23,535,26,270,29,353); // French spawn CASE 8
//Airport protection-CHINA
AddPlayerClass(287,-27.0539,2326.4404,24.1406,350.7502,34,160,25,165,16,50); // Chinese team Spawn CASE 9
AddPlayerClass(286,-27.0539,2326.4404,24.1406,350.7502,34,160,25,165,16,50); // Cinese team Spawn CASE 10
AddPlayerClass(285,-27.0539,2326.4404,24.1406,350.7502,34,160,25,165,16,50); // Chinese team Spawn CASE 11
SetTeamCount(4);
OnPlayerRequestClass...
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
switch(classid){
case 0:
{
SetPlayerPos(playerid,214.7366,1865.6632,13.1406);
SetPlayerFacingAngle(playerid,0.5259);
SetPlayerCameraPos(playerid,215.6613,1872.5498,13.1406);
SetPlayerCameraLookAt(playerid,214.7366,1865.6632,13.1406);
GameTextForPlayer(playerid,"~r~AREA 51 FORCES-USA",5000,4);
SetPlayerColor(playerid,0xFF0000FF);
}
case 2:
{
SetPlayerPos(playerid,214.7366,1865.6632,13.1406);
SetPlayerFacingAngle(playerid,0.5259);
SetPlayerCameraPos(playerid,215.6613,1872.5498,13.1406);
SetPlayerCameraLookAt(playerid,214.7366,1865.6632,13.1406);
GameTextForPlayer(playerid,"~r~AREA 51 FORCES-USA",5000,4);
SetPlayerColor(playerid,0xFF0000FF);
}
case 3:
{
SetPlayerPos(playerid,-821.8885,2765.8196,46.0000);
SetPlayerFacingAngle(playerid,170.8882);
SetPlayerCameraPos(playerid,-822.6266,2757.2876,45.8516);
SetPlayerCameraLookAt(playerid,-821.8885,2765.8196,46.0000);
GameTextForPlayer(playerid,"~G~Village forces-SPAIN",5000,4);
SetPlayerColor(playerid,0xFFFF00FF);
}
case 5:
{
SetPlayerPos(playerid,-821.8885,2765.8196,46.0000);
SetPlayerFacingAngle(playerid,170.8882);
SetPlayerCameraPos(playerid,-822.6266,2757.2876,45.8516);
SetPlayerCameraLookAt(playerid,-821.8885,2765.8196,46.0000);
GameTextForPlayer(playerid,"~G~Village forces-SPAIN",5000,4);
SetPlayerColor(playerid,0xFFFF00FF);
}
case 6:
{
SetPlayerPos(playerid,-614.7703,2708.8726,72.3750);
SetPlayerFacingAngle(playerid,179.5655);
SetPlayerCameraPos(playerid,-614.6206,2703.2019,72.3750);
SetPlayerCameraLookAt(playerid,-614.7703,2708.8726,72.3750);
GameTextForPlayer(playerid,"~B~Side forces-FRANCE",5000,4);
SetPlayerColor(playerid,0x0000FFFF);
}
case 8:
{
SetPlayerPos(playerid,-614.7703,2708.8726,72.3750);
SetPlayerFacingAngle(playerid,179.5655);
SetPlayerCameraPos(playerid,-614.6206,2703.2019,72.3750);
SetPlayerCameraLookAt(playerid,-614.7703,2708.8726,72.3750);
GameTextForPlayer(playerid,"~B~Side forces-FRANCE",5000,4);
SetPlayerColor(playerid,0x0000FFFF);
}
case 9:
{
SetPlayerPos(playerid,-27.8519,2325.9814,24.1406);
SetPlayerFacingAngle(playerid,359.7351);
SetPlayerCameraPos(playerid,-27.9873,2329.9561,24.1406);
SetPlayerCameraLookAt(playerid,-27.8519,2325.9814,24.1406);
GameTextForPlayer(playerid,"~P~Airport Protection FORCES-china",5000,4);
SetPlayerColor(playerid,0x00FF00FF);
}
case 11:
{
SetPlayerPos(playerid,-27.8519,2325.9814,24.1406);
SetPlayerFacingAngle(playerid,359.7351);
SetPlayerCameraPos(playerid,-27.9873,2329.9561,24.1406);
SetPlayerCameraLookAt(playerid,-27.8519,2325.9814,24.1406);
GameTextForPlayer(playerid,"~P~Airport Protection FORCES-china",5000,4);
SetPlayerColor(playerid,0x00FF00FF);
}
}
}
Function in the End of the script:
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_USA;
}
if (classid == 1)
{
gTeam[playerid] = TEAM_USA;
}
if (classid == 2)
{
gTeam[playerid] = TEAM_USA;
}
else
{
if (classid == 3)
{
gTeam[playerid] = TEAM_SPAIN;
}
if (classid == 4)
{
gTeam[playerid] = TEAM_SPAIN;
}
if (classid == 5)
{
gTeam[playerid] = TEAM_SPAIN;
}
else
{
if (classid == 6)
{
gTeam[playerid] = TEAM_FRANCE;
}
if (classid == 7)
{
gTeam[playerid] = TEAM_FRANCE;
}
if (classid == 8)
{
gTeam[playerid] = TEAM_FRANCE;
}
else
{
if (classid == 9)
{
gTeam[playerid] = TEAM_CHINA;
}
if (classid == 10)
{
gTeam[playerid] = TEAM_CHINA;
}
if (classid == 11)
{
gTeam[playerid] = TEAM_CHINA;
}
}
}
}
}
Well,There are no compiling errors,But when i'm going InGame i cant switch charecters -.-'
I didnt have that problem Before i added all Of The "Making a basic deathmatch" Shit.
Help Extremely appreciated.
Re: Guys i need your help here -
[XST]O_x - 06.10.2009
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
|
Non xD
it's empty O_o
I Didnt see anything in the tutorial mentioning OnPlayerRequestSpawn,I didnt use that callback
Re: Guys i need your help here -
[XST]O_x - 06.10.2009
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
|
Non xD
it's empty O_o
I Didnt see anything in the tutorial mentioning OnPlayerRequestSpawn,I didnt use that callback
|
i wanted to see because when when you press shift (for example) it calls OnplayerRequestSpawn*(and i was thinking you have in there anything wich can anoy the game and dont let spawn)
well this is a bit nooby way to solve, but since i cant see any problem with your game, use this as temporary solution :
Quote:
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid);
return 1;
}
|
|
Didnt work -.-'
Anyway thanks for trying to help.
Oh and another problem, I Cant switch skins,and the only skin i have is Cj.
Re: Guys i need your help here -
[XST]O_x - 06.10.2009
Quote:
EDIT : what a hell is setteamcount(4) on your gameinit ?
|
Hmm,number of teams? -.-'
Re: Guys i need your help here -
[XST]O_x - 06.10.2009
[quote=djlobo[Awesome-games.tk] ]
[quote=►ϻozilla Fir3foж◄ ]
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
|
Non xD
it's empty O_o
I Didnt see anything in the tutorial mentioning OnPlayerRequestSpawn,I didnt use that callback
|
i wanted to see because when when you press shift (for example) it calls OnplayerRequestSpawn*(and i was thinking you have in there anything wich can anoy the game and dont let spawn)
well this is a bit nooby way to solve, but since i cant see any problem with your game, use this as temporary solution :
Quote:
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid);
return 1;
}
|
|
Didnt work -.-'
Anyway thanks for trying to help.
Oh and another problem, I Cant switch skins,and the only skin i have is Cj.

|
are you using any other fs or something wich use addplayerclass on gamemodeinit ?
|
No.Im using only L Admin which have nothing to do with AddPlayerClass.
[quote=djlobo[Awesome-games.tk] ]
[quote=►ϻozilla Fir3foж◄ ]
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
EDIT : what a hell is setteamcount(4) on your gameinit ?
|
Hmm,number of teams? -.-'
|
Are you logined to it allow you to spawn ? have you tested the game without any other fs runing ?
|
No,i dont need to login to spawn,And i didnt test with any other fs running,I've just checked L Admin,
Trust me it have nothing to do with the problem.
Oh and,just wanted to say,The class selection worked fine with L Admin,it went wrong only after i added All the TeamDm shit
Too many Goddamn quotes.
Re: Guys i need your help here -
Jake Canfield - 06.10.2009
[quote=►ϻozilla Fir3foж◄ ]
[quote=djlobo[Awesome-games.tk] ]
[quote=►ϻozilla Fir3foж◄ ]
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
|
Non xD
it's empty O_o
I Didnt see anything in the tutorial mentioning OnPlayerRequestSpawn,I didnt use that callback
|
i wanted to see because when when you press shift (for example) it calls OnplayerRequestSpawn*(and i was thinking you have in there anything wich can anoy the game and dont let spawn)
well this is a bit nooby way to solve, but since i cant see any problem with your game, use this as temporary solution :
Quote:
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid);
return 1;
}
|
|
Didnt work -.-'
Anyway thanks for trying to help.
Oh and another problem, I Cant switch skins,and the only skin i have is Cj.

|
are you using any other fs or something wich use addplayerclass on gamemodeinit ?
|
No.Im using only L Admin which have nothing to do with AddPlayerClass.
[quote=djlobo[Awesome-games.tk] ]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
EDIT : what a hell is setteamcount(4) on your gameinit ?
|
Hmm,number of teams? -.-'
|
Are you logined to it allow you to spawn ? have you tested the game without any other fs runing ?
|
No,i dont need to login to spawn,And i didnt test with any other fs running,I've just checked L Admin,
Trust me it have nothing to do with the problem.
Too many Goddamn quotes.
|
So your using .3 right are you using ant NPC's? Cause i used a NPC then scripted a bit and came back and had same problem
Re: Guys i need your help here -
Jefff - 06.10.2009
Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
switch(classid){
case 0:
{
SetPlayerPos(playerid,214.7366,1865.6632,13.1406);
SetPlayerFacingAngle(playerid,0.5259);
SetPlayerCameraPos(playerid,215.6613,1872.5498,13.1406);
SetPlayerCameraLookAt(playerid,214.7366,1865.6632,13.1406);
GameTextForPlayer(playerid,"~r~AREA 51 FORCES-USA",5000,4);
SetPlayerColor(playerid,0xFF0000FF);
}
case 2:
{
SetPlayerPos(playerid,214.7366,1865.6632,13.1406);
SetPlayerFacingAngle(playerid,0.5259);
SetPlayerCameraPos(playerid,215.6613,1872.5498,13.1406);
SetPlayerCameraLookAt(playerid,214.7366,1865.6632,13.1406);
GameTextForPlayer(playerid,"~r~AREA 51 FORCES-USA",5000,4);
SetPlayerColor(playerid,0xFF0000FF);
}
case 3:
{
SetPlayerPos(playerid,-821.8885,2765.8196,46.0000);
SetPlayerFacingAngle(playerid,170.8882);
SetPlayerCameraPos(playerid,-822.6266,2757.2876,45.8516);
SetPlayerCameraLookAt(playerid,-821.8885,2765.8196,46.0000);
GameTextForPlayer(playerid,"~G~Village forces-SPAIN",5000,4);
SetPlayerColor(playerid,0xFFFF00FF);
}
case 5:
{
SetPlayerPos(playerid,-821.8885,2765.8196,46.0000);
SetPlayerFacingAngle(playerid,170.8882);
SetPlayerCameraPos(playerid,-822.6266,2757.2876,45.8516);
SetPlayerCameraLookAt(playerid,-821.8885,2765.8196,46.0000);
GameTextForPlayer(playerid,"~G~Village forces-SPAIN",5000,4);
SetPlayerColor(playerid,0xFFFF00FF);
}
case 6:
{
SetPlayerPos(playerid,-614.7703,2708.8726,72.3750);
SetPlayerFacingAngle(playerid,179.5655);
SetPlayerCameraPos(playerid,-614.6206,2703.2019,72.3750);
SetPlayerCameraLookAt(playerid,-614.7703,2708.8726,72.3750);
GameTextForPlayer(playerid,"~B~Side forces-FRANCE",5000,4);
SetPlayerColor(playerid,0x0000FFFF);
}
case 8:
{
SetPlayerPos(playerid,-614.7703,2708.8726,72.3750);
SetPlayerFacingAngle(playerid,179.5655);
SetPlayerCameraPos(playerid,-614.6206,2703.2019,72.3750);
SetPlayerCameraLookAt(playerid,-614.7703,2708.8726,72.3750);
GameTextForPlayer(playerid,"~B~Side forces-FRANCE",5000,4);
SetPlayerColor(playerid,0x0000FFFF);
}
case 9:
{
SetPlayerPos(playerid,-27.8519,2325.9814,24.1406);
SetPlayerFacingAngle(playerid,359.7351);
SetPlayerCameraPos(playerid,-27.9873,2329.9561,24.1406);
SetPlayerCameraLookAt(playerid,-27.8519,2325.9814,24.1406);
GameTextForPlayer(playerid,"~P~Airport Protection FORCES-china",5000,4);
SetPlayerColor(playerid,0x00FF00FF);
}
case 11:
{
SetPlayerPos(playerid,-27.8519,2325.9814,24.1406);
SetPlayerFacingAngle(playerid,359.7351);
SetPlayerCameraPos(playerid,-27.9873,2329.9561,24.1406);
SetPlayerCameraLookAt(playerid,-27.8519,2325.9814,24.1406);
GameTextForPlayer(playerid,"~P~Airport Protection FORCES-china",5000,4);
SetPlayerColor(playerid,0x00FF00FF);
}
}
return 1; //<==
}
Re: Guys i need your help here -
[XST]O_x - 06.10.2009
[quote=Jake Canfield ]
[quote=►ϻozilla Fir3foж◄ ]
[quote=djlobo[Awesome-games.tk] ]
[quote=►ϻozilla Fir3foж◄ ]
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
|
Non xD
it's empty O_o
I Didnt see anything in the tutorial mentioning OnPlayerRequestSpawn,I didnt use that callback
|
i wanted to see because when when you press shift (for example) it calls OnplayerRequestSpawn*(and i was thinking you have in there anything wich can anoy the game and dont let spawn)
well this is a bit nooby way to solve, but since i cant see any problem with your game, use this as temporary solution :
Quote:
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid);
return 1;
}
|
|
Didnt work -.-'
Anyway thanks for trying to help.
Oh and another problem, I Cant switch skins,and the only skin i have is Cj.

|
are you using any other fs or something wich use addplayerclass on gamemodeinit ?
|
No.Im using only L Admin which have nothing to do with AddPlayerClass.
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
EDIT : what a hell is setteamcount(4) on your gameinit ?
|
Hmm,number of teams? -.-'
|
Are you logined to it allow you to spawn ? have you tested the game without any other fs runing ?
|
No,i dont need to login to spawn,And i didnt test with any other fs running,I've just checked L Admin,
Trust me it have nothing to do with the problem.
Too many Goddamn quotes.
|
So your using .3 right are you using ant NPC's? Cause i used a NPC then scripted a bit and came back and had same problem
|
Nope non npc's used.
Biggest quote ever?
Re: Guys i need your help here -
[XST]O_x - 06.10.2009
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
read above jeff noticed weel you may return it to a positive value (return 1)
|
Ow sorry,What a goddamn noob i am

Thanks all for helping,Or at least trying to help
Re: Guys i need your help here -
Jake Canfield - 06.10.2009
[quote=►ϻozilla Fir3foж◄ ]
[quote=Jake Canfield ]
[quote=►ϻozilla Fir3foж◄ ]
[quote=djlobo[Awesome-games.tk] ]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
|
Non xD
it's empty O_o
I Didnt see anything in the tutorial mentioning OnPlayerRequestSpawn,I didnt use that callback
|
i wanted to see because when when you press shift (for example) it calls OnplayerRequestSpawn*(and i was thinking you have in there anything wich can anoy the game and dont let spawn)
well this is a bit nooby way to solve, but since i cant see any problem with your game, use this as temporary solution :
Quote:
public OnPlayerRequestSpawn(playerid)
{
SpawnPlayer(playerid);
return 1;
}
|
|
Didnt work -.-'
Anyway thanks for trying to help.
Oh and another problem, I Cant switch skins,and the only skin i have is Cj.

|
are you using any other fs or something wich use addplayerclass on gamemodeinit ?
|
No.Im using only L Admin which have nothing to do with AddPlayerClass.
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
Quote:
Originally Posted by djlobo[Awesome-games.tk
]
show me your OnplayerRequestSpawn
EDIT : what a hell is setteamcount(4) on your gameinit ?
|
Hmm,number of teams? -.-'
|
Are you logined to it allow you to spawn ? have you tested the game without any other fs runing ?
|
No,i dont need to login to spawn,And i didnt test with any other fs running,I've just checked L Admin,
Trust me it have nothing to do with the problem.
Too many Goddamn quotes.
|
So your using .3 right are you using ant NPC's? Cause i used a NPC then scripted a bit and came back and had same problem
|
Nope non npc's used.
Biggest quote ever?
|
Hmmm.... Any new features that you scripted into gm, fs that are only 0.3 compatible?