Not works -
davve95 - 12.10.2011
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
Re: Not works -
[MG]Dimi - 12.10.2011
You don't get skins defind in code from above?
Check Gamemode and all FSs for SetSpawnInfo or SetPlayerSkin
Re: Not works -
davve95 - 13.10.2011
Defind hmm no I don't thinks so... I have just filld spawn,skin and weapon... But anyway its looks so:
Re: Not works -
grand.Theft.Otto - 13.10.2011
Yes, you need to add more code. Whenever you use AddPlayerClass, you must add this under OnPlayerRequestClass:
pawn Code:
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
https://sampwiki.blast.hk/wiki/AddPlayerClass
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
https://sampwiki.blast.hk/wiki/ApplyAnimation
Re: Not works -
davve95 - 14.10.2011
Quote:
Originally Posted by grand.Theft.Otto
Yes, you need to add more code. Whenever you use AddPlayerClass, you must add this under OnPlayerRequestClass:
pawn Code:
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
https://sampwiki.blast.hk/wiki/AddPlayerClass
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
https://sampwiki.blast.hk/wiki/ApplyAnimation
|
Thank you so much Otto +1 rep