SA-MP Forums Archive
how is this possible? - 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: how is this possible? (/showthread.php?tid=105808)



how is this possible? - PANNA - 31.10.2009

i got no errors when i compile,
when i connect i only see the first skin i putted in the script, and 4 cj's

here is the code

Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("testing atm!");
	AddPlayerClass(82, -2026.7515,156.7179,29.0391,269.0951);
	AddPlayerClass(83, -2026.7515,156.7179,29.0391,269.0951);
	AddPlayerClass(84, -2026.7515,156.7179,29.0391,269.0951);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -2026.7515,156.7179,29.0391,269.0951);
	SetPlayerCameraPos(playerid, -2021.2136,156.7149,28.6917,88.1551);
	SetPlayerCameraLookAt(playerid, -2026.7515,156.7179,29.0391,269.0951);
		AddPlayerClass(82, -2026.7515,156.7179,29.0391,269.0951);
		AddPlayerClass(83, -2026.7515,156.7179,29.0391,269.0951);
		AddPlayerClass(84, -2026.7515,156.7179,29.0391,269.0951);
	return 1;
}



Re: how is this possible? - [03]Garsino - 31.10.2009

pawn Код:
public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("testing atm!");
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, -2026.7515,156.7179,29.0391,269.0951);
    SetPlayerCameraPos(playerid, -2021.2136,156.7149,28.6917,88.1551);
    SetPlayerCameraLookAt(playerid, -2026.7515,156.7179,29.0391,269.0951);
    AddPlayerClass(82, -2026.7515,156.7179,29.0391,269.0951);
    AddPlayerClass(83, -2026.7515,156.7179,29.0391,269.0951);
    AddPlayerClass(84, -2026.7515,156.7179,29.0391,269.0951);
    return 1;
}



Re: how is this possible? - Karlip - 31.10.2009

Wtf garsino.

You put the classes under OnPlayerRequestClass, while they should be on OnGameModeInit.

They're only supposed to be under OnGameModeInit.


Re: how is this possible? - [03]Garsino - 31.10.2009

Quote:
Originally Posted by Karlip
Wtf garsino.

You put the classes under OnPlayerRequestClass, while they should be on OnGameModeInit.

They're only supposed to be under OnGameModeInit.
It's late and I'm tired D:.
Everyone makes mistakes =/