AddPlayerClass
#1

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..
Reply
#2

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.
Reply
#3

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

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

Post an example of how you did one.

- Sorry Didnt See SickAttack -
Reply
#6

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

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.
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)