SA-MP Forums Archive
AddPlayerClass - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AddPlayerClass (/showthread.php?tid=615611)



AddPlayerClass - XHunterZ - 24.08.2016

I'm currently adding class system to my server, i use AddPlayerClass, when i compiled it, uploaded it on my sa-mp server, and when i logged into game, changed skin using right left button, it doesn't change skin from CJ..


Re: AddPlayerClass - SickAttack - 24.08.2016

Please refer to the wiki: https://sampwiki.blast.hk/wiki/AddPlayerClass

Check out the function's arguments: (skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)

Check out the skin IDs: https://sampwiki.blast.hk/wiki/Skins:All

Make sure that's how the script creates classes.


Re: AddPlayerClass - XHunterZ - 24.08.2016

can't be wrong, used /save command ingame..


Re: AddPlayerClass - SickAttack - 24.08.2016

Post the code of it, you also have to set the camera view.


Re: AddPlayerClass - WhiteGhost - 24.08.2016

Post an example of how you did one.

- Sorry Didnt See SickAttack -


Re: AddPlayerClass - XHunterZ - 24.08.2016

Код:
AddPlayerClass(119,  -1971.0557,134.8813,27.6875,88.5718,0,0,0,0,0,0); // Class ID  0 = Civilian



Re: AddPlayerClass - SickAttack - 24.08.2016

Set the camera view, and make sure that's how classes are created with the script you're using. It does work, tested it on a blank script.

pawn Код:
// ** INCLUDES

#include <a_samp>

// ** MAIN

main()
{
    print("Loaded \"blank.amx\".");
}

// ** CALLBACKS

public OnGameModeInit()
{
    AddPlayerClass(119,  -1971.0557,134.8813,27.6875,88.5718,0,0,0,0,0,0); // Class ID  0 = Civilian
    return 1;
}

public OnGameModeExit()
{
    return 1;
}
It sets the player's skin and position on spawn.


Re: AddPlayerClass - XHunterZ - 26.08.2016

the gamemode was fine, there was sum problem in includes, thanks for helping!