Why won't it show all 4? -
BleverCastard - 22.04.2012
This is my OnPlayerRequestClass:
Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0:
{
//Police Spawn
SetPlayerPos(playerid, 2296.5662,2451.6270, 10.8203);
SetPlayerFacingAngle(playerid, 87.8270);
//Camera Position Police
SetPlayerCameraPos(playerid, 2293.3640,2451.7341,12.8203);
//Police Spawn
SetPlayerCameraLookAt(playerid, 2296.5662,2451.6270, 10.8203);
PlayerInfo[playerid][Team] = Cops;
}
case 1:
{
SetPlayerPos(playerid, 2516.9578,2447.6992,11.0313);
SetPlayerFacingAngle(playerid, 269.7719);
SetPlayerCameraPos(playerid, 2521.2405,2447.5195,12.0313);
SetPlayerCameraLookAt(playerid, 2516.9578,2447.6992,11.0313);
PlayerInfo[playerid][Team] = Civilian;
}
case 2:
{
SetPlayerPos(playerid, 2296.5662,2451.6270, 10.8203);
SetPlayerFacingAngle(playerid, 87.8270);
//Camera Position Police
SetPlayerCameraPos(playerid, 2293.3640,2451.7341,12.8203);
//Police Spawn
SetPlayerCameraLookAt(playerid, 2296.5662,2451.6270, 10.8203);
PlayerInfo[playerid][Team] = Cops;
}
case 3:
{
SetPlayerPos(playerid, 2516.9578,2447.6992,11.0313);
SetPlayerFacingAngle(playerid, 269.7719);
SetPlayerCameraPos(playerid, 2521.2405,2447.5195,12.0313);
SetPlayerCameraLookAt(playerid, 2516.9578,2447.6992,11.0313);
PlayerInfo[playerid][Team] = Civilian;
}
}
return 1;
}
I added Case 2 and case 3 also adding the AddPlayerClass but it won't show case 2 + 3? Help?!
Re: Why won't it show all 4? -
Rachael - 22.04.2012
debug this by putting a print at the beginning of the callback that shows you the classid.
Re: Why won't it show all 4? -
BleverCastard - 22.04.2012
Huh?:L
Re: Why won't it show all 4? -
Rachael - 22.04.2012
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
printf( "OnPlayerRequestclass %d classid %d" , playerid , classid );
//rest of callback as normal
Re: Why won't it show all 4? -
[MG]Dimi - 22.04.2012
What Rachael said is:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
printf("Called OnPlayerRequestClass(for player: %d,for classid: %d)",playerid,classid);
switch(classid)
{
case 0:
{
//Police Spawn
SetPlayerPos(playerid, 2296.5662,2451.6270, 10.8203);
SetPlayerFacingAngle(playerid, 87.8270);
//Camera Position Police
SetPlayerCameraPos(playerid, 2293.3640,2451.7341,12.8203);
//Police Spawn
SetPlayerCameraLookAt(playerid, 2296.5662,2451.6270, 10.8203);
PlayerInfo[playerid][Team] = Cops;
}
case 1:
{
SetPlayerPos(playerid, 2516.9578,2447.6992,11.0313);
SetPlayerFacingAngle(playerid, 269.7719);
SetPlayerCameraPos(playerid, 2521.2405,2447.5195,12.0313);
SetPlayerCameraLookAt(playerid, 2516.9578,2447.6992,11.0313);
PlayerInfo[playerid][Team] = Civilian;
}
case 2:
{
SetPlayerPos(playerid, 2296.5662,2451.6270, 10.8203);
SetPlayerFacingAngle(playerid, 87.8270);
//Camera Position Police
SetPlayerCameraPos(playerid, 2293.3640,2451.7341,12.8203);
//Police Spawn
SetPlayerCameraLookAt(playerid, 2296.5662,2451.6270, 10.8203);
PlayerInfo[playerid][Team] = Cops;
}
case 3:
{
SetPlayerPos(playerid, 2516.9578,2447.6992,11.0313);
SetPlayerFacingAngle(playerid, 269.7719);
SetPlayerCameraPos(playerid, 2521.2405,2447.5195,12.0313);
SetPlayerCameraLookAt(playerid, 2516.9578,2447.6992,11.0313);
PlayerInfo[playerid][Team] = Civilian;
}
}
return 1;
}
My question is: You have 4 times AddPlayerClass?
Re: Why won't it show all 4? -
BleverCastard - 22.04.2012
Код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3e-RC7, ©2005-2012 SA-MP Team
[15:08:01]
[15:08:01] Server Plugins
[15:08:01] --------------
[15:08:01] Loading plugin: sscanf
[15:08:01]
[15:08:01] ===============================
[15:08:01] sscanf plugin loaded.
[15:08:01] © 2009 Alex "******" Cole
[15:08:01] 0.3d-R2 500 Players "dnee"
[15:08:01] ===============================
[15:08:01] Loaded.
[15:08:01] Loaded 1 plugins.
[15:08:01]
[15:08:01] Filterscripts
[15:08:01] ---------------
[15:08:01] Loading filterscript 'SecuriCon.amx'...
[15:08:01] OnFilter
[15:08:01]
--------------------------------------
[15:08:01] SecuriCon by Joshb93 loaded!
[15:08:01] --------------------------------------
[15:08:01] Loading filterscript 'Attachments.amx'...
[15:08:02] Loaded 2 filterscripts.
[15:08:02]
[15:08:02] =======================================
[15:08:02] | |
[15:08:02] | YSI version 1.04.0000 |
[15:08:02] | By Alex "******" Cole |
[15:08:02] | |
[15:08:02] | Checking the latest YSI version.. |
[15:08:02] | |
[15:08:02] =======================================
[15:08:02]
[15:08:02] OnGameo
[15:08:02] OnGameo
[15:08:02]
----------------------------------
[15:08:02] Blank Gamemode by your name here
[15:08:02] ----------------------------------
[15:08:02] Number of vehicle models: 0
[15:08:23]
[15:08:23] ========================================
[15:08:23] | |
[15:08:23] | Could not connect to update server |
[15:08:23] | at this time, (your code will |
[15:08:23] | still work (response was 003)). |
[15:08:23] | |
[15:08:23] ========================================
[15:08:23]
[15:08:47] Incoming connection: 127.0.0.1:49578
[15:08:48] [join] TimeWarp has joined the server (0:127.0.0.1)
[15:09:07] [part] TimeWarp has left the server (0:1)
@Dimi,
Yes because they all have different skins.