Need help fast!! Player Classes!!
#1

hi,

i used to have the class selection functions in a gamemode (also in the server.cfg it was a gamemode)
but now i want to make a gamemode for each map, so i wanted to write the only function that was in the gamemode to my filterscript.(because gamemodes shall only be maps)
But it doesent work, as soon as i come to the class selection u cant see nothing.
Only black background and also no charackters!!

this is the code i ve put into my filterscript (that was everything that has been in the gamemode script, after ive written this code to my fs i removed this gamemode from the server.cfg)

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

SetupPlayerForClassSelection(playerid)
{
    SetPlayerInterior(playerid,5);
    SetPlayerPos(playerid,325.3076,307.2961,999.1484);
    SetPlayerFacingAngle(playerid, 180.0);
    SetPlayerCameraPos(playerid,325.2424,304.7940,998.9700);
    SetPlayerCameraLookAt(playerid,325.3076,307.2961,999.1484);
}

public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);


ApplyAnimation(playerid,"ON_LOOKERS","wave_loop",4.1,1,1,1,1,1,1);

    return 1;
}

public OnGameModeInit()
{
    SetGameModeText("Bomb Protection");
    ShowPlayerMarkers(1);
    ShowNameTags(1);
    AllowAdminTeleport(1);


    return 1;
}
pls i need ur help fast
Reply
#2

Код:
public OnPlayerSpawn(playerid)
{
	SetPlayerInterior(playerid,0);
	TogglePlayerClock(playerid,0);
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid,5);
	SetPlayerPos(playerid,325.3076,307.2961,999.1484);
	SetPlayerFacingAngle(playerid, 180.0);
	SetPlayerCameraPos(playerid,325.2424,304.7940,998.9700);
	SetPlayerCameraLookAt(playerid,325.3076,307.2961,999.1484);
	ApplyAnimation(playerid,"ON_LOOKERS","wave_loop",4.1,1,1,1,1,1,1);
	return 1;
}

public OnGameModeInit()
{
	SetGameModeText("Bomb Protection");
	ShowPlayerMarkers(1);
	ShowNameTags(1);
	AllowAdminTeleport(1);
	return 1;
}
i cleaned it up, don't know if it will work though.
Reply
#3

thx

i did another mistake but because of ur clean post i could find it thx so much
Reply
#4

no problem
Reply
#5

btw do u know what the command is to go to the next gamemode in the server.cfg?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)