SA-MP Forums Archive
Need help fast!! Player Classes!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help fast!! Player Classes!! (/showthread.php?tid=197864)



Need help fast!! Player Classes!! - BlackWolf120 - 10.12.2010

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


Re: Need help fast!! Player Classes!! - MW2_OWN3D - 10.12.2010

Код:
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.


Re: Need help fast!! Player Classes!! - BlackWolf120 - 10.12.2010

thx

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


Re: Need help fast!! Player Classes!! - MW2_OWN3D - 10.12.2010

no problem


Re: Need help fast!! Player Classes!! - BlackWolf120 - 10.12.2010

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