PDA

View Full Version : Not works


davve95
12/10/2011, 05:52 PM
Hi!

Sorry for very weird question but i'm new with scripting anyway here is my problem:

I have type in:

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(50,1540.8580,-841.5468,64.3361,92.3168,342,0,0,0,0,0);
AddPlayerClass(34,1535.6891,-885.2205,57.6575,315.5768,342,0,0,0,0,0); // spawn 2
AddPlayerClass(89,1468.2552,-906.1782,54.8359,3.2666,342,0,0,0,0,0); // spawn 3


But when I spawn I don't get that skin etc.. Does I have to code some more?? If I have to, tell me :)

Edit: Btw I have all the others code in the "mall" In Pawno

[MG]Dimi
12/10/2011, 06:30 PM
You don't get skins defind in code from above?
Check Gamemode and all FSs for SetSpawnInfo or SetPlayerSkin

davve95
13/10/2011, 04:03 PM
Defind hmm no I don't thinks so... I have just filld spawn,skin and weapon... But anyway its looks so: http://img844.imageshack.us/img844/8249/namnlssssss.png (http://imageshack.us/photo/my-images/844/namnlssssss.png/)

grand.Theft.Otto
13/10/2011, 10:25 PM
Yes, you need to add more code. Whenever you use AddPlayerClass, you must add this under OnPlayerRequestClass:


switch(classid)
{
case 0: // this is the FIRST AddPlayerClass line you have under ongamemodeinit
{
SetPlayerPos(playerid, x,y,z); // set there x y z position of where u want them to stand
SetPlayerCameraPos(playerid, x,y,z); // set where you want the camera to be positions to show them
SetPlayerCameraLookAt(playerid, x,y,z); // should use the same coordinates here as SetPlayerPos
// you can also add anims like dancing anims
}
case 1: // this is the SECOND AddPlayerClass line you have under ongamemodeinit
{
// do the same as case 0
// you can also add anims like dancing anims
}
case 2: // this is the THIRD AddPlayerClass line you have under ongamemodeinit
{
// do the same as case 0
// you can also add anims like dancing anims
}
}

// in total , case 0,1 and 2 are the first 3 AddPlayerClass lines you have
// if you want more, you can add case 3, case 4, etc .. but you need to add more AddPlayerClass


http://wiki.sa-mp.com/wiki/AddPlayerClass
http://wiki.sa-mp.com/wiki/SetPlayerPos
http://wiki.sa-mp.com/wiki/SetPlayerCameraPos
http://wiki.sa-mp.com/wiki/SetPlayerCameraLookAt
http://wiki.sa-mp.com/wiki/ApplyAnimation

davve95
14/10/2011, 07:09 AM
Yes, you need to add more code. Whenever you use AddPlayerClass, you must add this under OnPlayerRequestClass:


switch(classid)
{
case 0: // this is the FIRST AddPlayerClass line you have under ongamemodeinit
{
SetPlayerPos(playerid, x,y,z); // set there x y z position of where u want them to stand
SetPlayerCameraPos(playerid, x,y,z); // set where you want the camera to be positions to show them
SetPlayerCameraLookAt(playerid, x,y,z); // should use the same coordinates here as SetPlayerPos
// you can also add anims like dancing anims
}
case 1: // this is the SECOND AddPlayerClass line you have under ongamemodeinit
{
// do the same as case 0
// you can also add anims like dancing anims
}
case 2: // this is the THIRD AddPlayerClass line you have under ongamemodeinit
{
// do the same as case 0
// you can also add anims like dancing anims
}
}

// in total , case 0,1 and 2 are the first 3 AddPlayerClass lines you have
// if you want more, you can add case 3, case 4, etc .. but you need to add more AddPlayerClass


http://wiki.sa-mp.com/wiki/AddPlayerClass
http://wiki.sa-mp.com/wiki/SetPlayerPos
http://wiki.sa-mp.com/wiki/SetPlayerCameraPos
http://wiki.sa-mp.com/wiki/SetPlayerCameraLookAt
http://wiki.sa-mp.com/wiki/ApplyAnimation



Thank you so much Otto +1 rep :)