10.11.2011, 08:15
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
heres what i mean
AddPlayerClass is for Adding Skin but how to use it.
now lets go into scripting part
6.)Open or Create new PWN
7.)Goto into OnPlayerRequestClass then change old PWN Codes
into this:
now go ingame see if it works. if it works congratz. i hope i helped!
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
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);
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