OnPlayerRequestClass - Tutorial -
GAMER_PS2 - 10.11.2011
Since on New Gamemode PWN the PWN will automaticlly add a code onplayerrequestclass now you wanna
change those codes to your own camera pos,playerpos and many more. then this is for you.
This tutorial will help beginners to teach them how to use OnPlayerRequestClass.
Steps
1,)we will need to go ingame.
2.)First we will save the position for the Player Pos after you get the pos type /save GuySelectSkin
3.)Next we will save the position for the Camera Pos after you get the pos type /save CameraPos
4.)Now open your My Doucmnets >>> SAMP >>> SavedPositions.txt
5.)You will see those
pawn Code:
//Example Only
AddPlayerClass(103,1922.2206,-1738.0587,13.5469,271.8433,0,0,0,0,0,0); // BallasShop
AddPlayerClass(0,2518.8889,-1684.6166,13.4648,45.1893,0,0,0,0,0,0); // GroveShop
AddPlayerClass(109,2668.3481,-1458.2719,30.5492,258.0261,0,0,0,0,0,0); // VagosShop
AddPlayerClass(114,1377.3721,-1885.4116,13.4952,357.3209,0,0,0,0,0,0); // AztecsShop
heres what i mean
AddPlayerClass is for Adding Skin but how to use it.
pawn Code:
AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
now lets go into scripting part
6.)Open or Create new PWN
7.)Goto into OnPlayerRequestClass then change old PWN Codes
into this:
pawn Code:
//Code Below
SetPlayerPos(playerid,,Float:x, Float:y, Float:z); //replace this with your GuySelectSkin coordinates
SetPlayerFacingAngle(playerid,Float:z_angle); //replace this with your GuySelectSkin coordinates (EG. 48.908131) you will pick the 48 and put on FacingAngle
SetPlayerCameraLookAt(playerid,Float:x, Float:y, Float:z); //This is where the camera will look at. Make sure copy the correct coordinates the Example of this is GuySelectSkin
SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z); //This is where the camera position. copy the coordinates of camera
now go ingame see if it works. if it works congratz. i hope i helped!
Re: OnPlayerRequestClass - Tutorial -
seanny - 10.11.2011
Good, Rep+'ed
Re: OnPlayerRequestClass - Tutorial -
NessaHD - 10.11.2011
Where is the part where you need to add it into the pawn file?..
Re: OnPlayerRequestClass - Tutorial -
Kakioshe22 - 10.11.2011
Easy:
Go into any samp server and type /save [name] in place you need, when you get out of game, go to samp located and pick savedpositions.txt and find line with name you added, get out only X, Y and Z and post it, or anything you need get out of there
Re: OnPlayerRequestClass - Tutorial -
jiwan - 11.11.2011
will help a lot of people thx.
Re: OnPlayerRequestClass - Tutorial -
GAMER_PS2 - 11.11.2011
Quote:
Originally Posted by Kakioshe22
Easy:
Go into any samp server and type /save [name] in place you need, when you get out of game, go to samp located and pick savedpositions.txt and find line with name you added, get out only X, Y and Z and post it, or anything you need get out of there
|
Uh, Kakioshe your from Stunt Planet Right? and Kakioshe this is for beginners.
lets talk to pm so we can talk one on one