Player unable to spawn after switching class
#1

Let me explain what's the problem:
Let's say that Player_X connects to the server, chooses his skin and spawns but then he gets bored of his current skin and he decides to press f4 and use /kill so he can choose a new skin, when he tries to spawn the server doesn't let him, it doesn't matter how many times presses the "spawn" button the server doesn't let he spawn.

What could be the problem?

Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid,classid);
	SetPlayerPos(playerid, 728.0,-1276.2778,13.6484);
	SetPlayerCameraPos(playerid, 733.0,-1276.30,15.077648925781);
	SetPlayerCameraLookAt(playerid, 726.2526,-1276.2778,13.6484);
	SetPlayerFacingAngle( playerid, 270 );

    if(classid == 0 || classid == 1) {
	TextDrawShowForPlayer(playerid, Textdraw0[playerid]);
	TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
	//TextDrawShowForPlayer(playerid, Text-draw2);
	TextDrawHideForPlayer(playerid,Textdraw3[playerid]);
	TextDrawHideForPlayer(playerid,Textdraw4[playerid]);
	//TextDrawHideForPlayer(playerid,Text-draw5);

    } else if(classid == 2 || classid == 3) {
	TextDrawShowForPlayer(playerid, Textdraw3[playerid]);
	TextDrawShowForPlayer(playerid, Textdraw4[playerid]);
	//TextDrawShowForPlayer(playerid, Text-draw5);
	TextDrawHideForPlayer(playerid,Textdraw0[playerid]);
	TextDrawHideForPlayer(playerid,Textdraw1[playerid]);
	//TextDrawHideForPlayer(playerid,Text-draw2);

	}

	if(classid == 0 ) {
        ApplyAnimation(playerid,"SHOP","SHP_Gun_Aim",4.0,1,0,0,0,-1);
        SetPlayerAttachedObject(playerid,0,355,1,0.270000,0.266000,0.037999,75.500198,79.900032,82.399917,1.084998,1.000000,0.990999);

 }

	if(classid == 1 ) {
        SetPlayerAttachedObject(playerid,0,348,6,-0.062999,0.023000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
		ApplyAnimation(playerid,"SHOP","ROB_Loop_Threat",4.0,1,0,0,0,-1);

	}

	if(classid == 2 ) {
        SetPlayerAttachedObject(playerid,0,348,6,-0.062999,0.023000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
		ApplyAnimation(playerid,"SHOP","ROB_Loop",4.0,1,0,0,0,-1);

	}

	if(classid == 3 ) {
        SetPlayerAttachedObject(playerid,0,356,6,-0.062999,0.023000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
		ApplyAnimation(playerid,"SHOP","SHP_Gun_Aim",4.0,1,0,0,0,-1);

	}
	return 1;
}
Reply
#2

Show the callback OnPlayerRequestSpawn.
Reply
#3

I fixed it, thank you a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)