SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/10/2011, 05:52 PM   #1
davve95
High-roller
 
davve95's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 3,138
Reputation: 234
Default Not works

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

Last edited by davve95; 13/10/2011 at 03:54 PM.
davve95 is offline   Reply With Quote
Old 12/10/2011, 06:30 PM   #2
[MG]Dimi
High-roller
 
[MG]Dimi's Avatar
 
Join Date: Mar 2011
Location: Serbia
Posts: 1,239
Reputation: 144
Default Re: Not works

You don't get skins defind in code from above?
Check Gamemode and all FSs for SetSpawnInfo or SetPlayerSkin
__________________
Scripting Admin/Account/VIP Systems for $$$ using ZCMD,dcmd, Dini, MySQL and sscanf.Scripting IRC Systems with all possible functions. (Echo channels, Chat channels, Admin channels...)Long time Experience with IRC Systems.For both offers PM me
Mini Games ServerServer IP:178.238.236.62:7777
[MG]Dimi is offline   Reply With Quote
Old 13/10/2011, 04:03 PM   #3
davve95
High-roller
 
davve95's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 3,138
Reputation: 234
Default Re: Not works

Defind hmm no I don't thinks so... I have just filld spawn,skin and weapon... But anyway its looks so:
davve95 is offline   Reply With Quote
Old 13/10/2011, 10:25 PM   #4
grand.Theft.Otto
High-roller
 
grand.Theft.Otto's Avatar
 
Join Date: Sep 2010
Location: Canada
Posts: 1,059
Reputation: 65
Default Re: Not works

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

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
__________________


grand.Theft.Otto is offline   Reply With Quote
Old 14/10/2011, 07:09 AM   #5
davve95
High-roller
 
davve95's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 3,138
Reputation: 234
Default Re: Not works

Quote:
Originally Posted by grand.Theft.Otto View Post
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

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
davve95 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nothing works for me :( Buzzbomb Help Archive 26 15/11/2010 07:52 AM
Why this not works? Cypress Help Archive 2 08/11/2010 06:55 PM
ONLY WORKS FOR ID 0 WHY!!! JoeeeFm8 Help Archive 14 03/01/2010 11:22 AM
help me 2 works emch0o Help Archive 1 26/08/2009 06:49 PM
My sa mp works only from 7 pm to 7 am Pinolo Client Support 10 23/08/2009 01:47 AM


All times are GMT. The time now is 06:03 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.