08.05.2012, 22:44
For some reason, OnPlayerRequestClass isn't working correctly.
I use this:
When I go left and right (I only have two classes), it doesn't recognise it and doesn't come up with any text...
It shows the two characters that I have, but still doesn't do anything? What's wrong?
Thanks.
What's the problem?
I use this:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(gPlayerLogged[playerid] == 0)
{
ShowPlayerDialog(playerid,1234, DIALOG_STYLE_MSGBOX,"Server Rules","Cheating and Hacking is not allowed\nAdvertising other Server's is not allowed\nSpawn Killing is not allowed\nUse of foul language against opponents is forbidden (EG: Swearing/Name calling)","Accept","Refuse");
}
else return 1;
if(classid == 0)
{
GameTextForPlayer(playerid, "~r~ARMY!~n~~w~M4 Carbine~n~9MM~n~MP5~n~SNIPER RIFLE~n~TEAR GAS~n~FRAG GRENADE", 3000, 5);
SendClientMessage(playerid, GREY, "ARMY");
}
if(classid == 1)
{
GameTextForPlayer(playerid, "~r~ENEMY!~n~~w~AK-47~n~9MM~n~MP5~n~SNIPER RIFLE~n~TEAR GAS~n~FRAG GRENADE", 3000, 5);
SendClientMessage(playerid, GREY, "ENEMY");
}
SetPlayerPos(playerid, player_x,player_y,player_z);
SetPlayerFacingAngle(playerid, player_angle);
SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z);
SetPlayerCameraLookAt(playerid, player_x,player_y,player_z);
ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid);
PlayerInfo[playerid][SpawnDance] = false;
SetPlayerTeamFromClass(playerid, classid);
return 1;
}
It shows the two characters that I have, but still doesn't do anything? What's wrong?
Thanks.
What's the problem?