Class - 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)
+--- Thread: Class (
/showthread.php?tid=293233)
Class -
wumpyc - 27.10.2011
Hey guys im scripting a GM, but when i should chosee skin i only see left and right arrow and spawn...no skins avaible to chose..only can spawn and get skin 0..
CODE:
PHP код:
public OnGameModeInit()
{
SetGameModeText("Wum Mode V.0");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(45, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
Re: Class -
Censure - 27.10.2011
Код:
SetPlayerPos(playerid, 1958, 1343, 15.35);
SetPlayerCameraPos(playerid, 1961, 1346, 17.35);
SetPlayerCameraLookAt(playerid, 1958, 1343, 15.35);
Your camera has to a little way away from your player. Try that.
Re: Class -
grand.Theft.Otto - 27.10.2011
For each " AddPlayerClass " , you must add a " case " statement for each of the AddPlayerClass functions under OnPlayerRequestClass:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0: // this is the first AddPlayerClass
{
// setplayerpos
// setplayercamerapos
// setplayercameralookat
// other stuff
}
case 1: // this is the second AddPlayerClass
{
// setplayerpos
// setplayercamerapos
// setplayercameralookat
// other stuff
}
}
return 1;
}
The more " AddPlayerClass " you use, the more " case " statements you use.
Re: Class -
|_ⒾⓇⓄN_ⒹⓄG_| - 27.10.2011
Quote:
Originally Posted by grand.Theft.Otto
For each " AddPlayerClass " , you must add a " case " statement for each of the AddPlayerClass functions under OnPlayerRequestClass:
pawn Код:
public OnPlayerRequestClass(playerid, classid) { switch(classid) { case 0: // this is the first AddPlayerClass { // setplayerpos // setplayercamerapos // setplayercameralookat // other stuff } case 1: // this is the second AddPlayerClass { // setplayerpos // setplayercamerapos // setplayercameralookat // other stuff } } return 1; }
The more " AddPlayerClass " you use, the more " case " statements you use.
|
where u learned that? LOL
its fake!
u dont need that at all!
just try to put the camera a bit far away or add more skins...
Re: Class -
grand.Theft.Otto - 27.10.2011
True " u dont need that at all! " , but some people (like me) use my method if you want certain skins to show different positions/cameras.
Your (and wumpy's) method only shows only for one camera and position.
Re: Class -
wumpyc - 28.10.2011
Quote:
Originally Posted by Censure
Код:
SetPlayerPos(playerid, 1958, 1343, 15.35);
SetPlayerCameraPos(playerid, 1961, 1346, 17.35);
SetPlayerCameraLookAt(playerid, 1958, 1343, 15.35);
Your camera has to a little way away from your player. Try that.
|
Thanks dude