need help with class selection bug! -
Randomai - 01.03.2011
Im making Zombie server.
okay the problem is that i goto my server and select Police Officer, then i spawn normally at police station.but if i wanna select another class i do / kill + f4 so i can return to class selection.after i choose any class i will spawn as zombie, why?
Re: need help with class selection bug! -
Stigg - 01.03.2011
Sounds like your setting a saved players skin on player spawn, thus skipping your new skin choice.
Re: need help with class selection bug! -
Medal Of Honor team - 01.03.2011
show us the code so that we can simplify the code
Re: need help with class selection bug! -
Randomai - 01.03.2011
im not sure what code you need, but there is 2.I would be glad if some "helper" could add my MSN:
_joku_@hotmail.fi it would be easier to help, because if this is not small problem
Код:
public OnPlayerRequestClass(playerid,classid)
{
SetPlayerPos(playerid,299.9177,2741.7598,42.9127);
SetPlayerFacingAngle(playerid,150.9686);
SetPlayerCameraPos(playerid,295.3498,2730.6697,37.0493);
SetPlayerCameraLookAt(playerid,299.9177,2741.7598,42.9127);
if(classid >= 0 && classid <= 3)
{
GameTextForPlayer(playerid, "~b~Police Officer ~w~/ Survivor", 3000, 3);
PlayerTeam[playerid] = 0;
SetPlayerTeam(playerid,0);
}
Код:
public OnPlayerSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 285)
{
HumanTeam(playerid);
GivePlayerMoney(playerid, 5500);
SetPlayerTeam(playerid,0);
}
else if(GetPlayerSkin(playerid) == 162)
{
ZombieTeam(playerid);
ResetPlayerMoney(playerid);
ResetPlayerWeapons(playerid);
SetPlayerTeam(playerid,1);
}
Re: need help with class selection bug! -
Stigg - 01.03.2011
Show the code you have under:
pawn Код:
public OnPlayerSpawn(playerid)
{
return 1;
}
Too late lol
Re: need help with class selection bug! -
Stigg - 01.03.2011
You only have 2 skins ?
Re: need help with class selection bug! -
Randomai - 01.03.2011
there is whole code, and i have more skins , didnt just put them, because it really dont matter.-.-
Код:
public OnPlayerSpawn(playerid)
{
ResetPlayerMoney(playerid);
SetPlayerMapIcon(playerid, 21, 1172.8318,-1323.2954,15.4001, 22, 0); // Hospital
SetPlayerMapIcon(playerid, 22, 1555.0673,-1675.6428,16.1953, 30, 0); // LSPD
SetPlayerMapIcon(playerid, 23, 1196.6050,-905.2882,53.1678, 10, 0); // big burger shot
SetPlayerMapIcon(playerid, 24, 1542.2101,-1357.5652,329.4665, 11, 0); // big tower
if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286 || GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 182 || GetPlayerSkin(playerid) == 186 || GetPlayerSkin(playerid) == 20 || GetPlayerSkin(playerid) == 46 || GetPlayerSkin(playerid) == 93 || GetPlayerSkin(playerid) == 195 || GetPlayerSkin(playerid) == 70 || GetPlayerSkin(playerid) == 83 || GetPlayerSkin(playerid) == 274)
{
HumanTeam(playerid);
GivePlayerMoney(playerid, 5500);
SetPlayerTeam(playerid,0);
}
else if(GetPlayerSkin(playerid) == 80 || GetPlayerSkin(playerid) == 81)
{
HumanTeam(playerid);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
GivePlayerMoney(playerid, 10000);
SetPlayerTeam(playerid,0);
SendClientMessage(playerid, COLOR_PURPLE,"PREMIUM BONUS: 10000 Money + Boxing Fighting Style");
}
else if(GetPlayerSkin(playerid) == 203 || GetPlayerSkin(playerid) == 204)
{
HumanTeam(playerid);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
GivePlayerMoney(playerid, 10000);
SetPlayerTeam(playerid,0);
SendClientMessage(playerid, COLOR_PURPLE,"PREMIUM BONUS: 10000 Money + Kungfu Fighting Style");
}
else if(GetPlayerSkin(playerid) == 206 || GetPlayerSkin(playerid) == 293)
{
HumanTeam(playerid);
SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
GivePlayerMoney(playerid, 10000);
SetPlayerTeam(playerid,0);
SendClientMessage(playerid, COLOR_PURPLE,"PREMIUM BONUS: 10000 Money + Street Fighter Fighting Style");
}
else if(GetPlayerSkin(playerid) == 162)
{
ZombieTeam(playerid);
ResetPlayerMoney(playerid);
ResetPlayerWeapons(playerid);
SetPlayerTeam(playerid,1);
}
switch(Arena[ID])
{
case 0:
{
if(PlayerTeam[playerid] == 0)
{
new position = random(sizeof(HumanSpawn));
SetPlayerPos(playerid, HumanSpawn[position][0], HumanSpawn[position][1], HumanSpawn[position][2]);
SetPlayerFacingAngle(playerid,0.3154);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
new position = random(sizeof(ZombieSpawn));
SetPlayerPos(playerid, ZombieSpawn[position][0], ZombieSpawn[position][1], ZombieSpawn[position][2]);
SetPlayerFacingAngle(playerid,269.7846);
SetPlayerInterior(playerid,0);
}
}
case 1:
{
if(PlayerTeam[playerid] == 0)
{
new position = random(sizeof(HumanSpawn));
SetPlayerPos(playerid, HumanSpawn[position][0], HumanSpawn[position][1], HumanSpawn[position][2]);
SetPlayerFacingAngle(playerid,269.3734);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
new position = random(sizeof(ZombieSpawn));
SetPlayerPos(playerid, ZombieSpawn[position][0], ZombieSpawn[position][1], ZombieSpawn[position][2]);
SetPlayerFacingAngle(playerid,178.7957);
SetPlayerInterior(playerid,0);
}
}
case 2:
{
if(PlayerTeam[playerid] == 0)
{
new position = random(sizeof(HumanSpawn));
SetPlayerPos(playerid, HumanSpawn[position][0], HumanSpawn[position][1], HumanSpawn[position][2]);
SetPlayerFacingAngle(playerid,85.3327);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
new position = random(sizeof(ZombieSpawn));
SetPlayerPos(playerid, ZombieSpawn[position][0], ZombieSpawn[position][1], ZombieSpawn[position][2]);
SetPlayerFacingAngle(playerid,87.8066);
SetPlayerInterior(playerid,0);
}
}
case 3:
{
if(PlayerTeam[playerid] == 0)
{
new position = random(sizeof(HumanSpawn));
SetPlayerPos(playerid, HumanSpawn[position][0], HumanSpawn[position][1], HumanSpawn[position][2]);
SetPlayerFacingAngle(playerid,178.3608);
SetPlayerInterior(playerid,0);
}
if(PlayerTeam[playerid] == 1)
{
new position = random(sizeof(ZombieSpawn));
SetPlayerPos(playerid, ZombieSpawn[position][0], ZombieSpawn[position][1], ZombieSpawn[position][2]);
SetPlayerFacingAngle(playerid,269.5417);
SetPlayerInterior(playerid,0);
}
}
}
return 1;
}