Load selected player class
#1

I have some code which saves into a file which player class the player chose in the class selection. But now I would like to make it so that when the player enters the server again, the class which they used before will be selected right away so that they don't have to look for it among 200 other classes. Any help on how I could do this?
Reply
#2

Try to call OnPlayerRequestClass with the class variable from your file.

pawn Код:
OnPlayerRequestClass(playerid, dini_Int(file,"Class"));
Reply
#3

Didn't work Any other ideas?
Reply
#4

work with dini and Spawn(playerid) (make it skip class selection)
Reply
#5

SetPlayerClass ?
Reply
#6

Unless weapons/ammo loadout is specified when using AddPlayerClass(...), then the only difference in classes is the Skin ID, just load that...
Reply
#7

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
SetPlayerClass ?
I don't have this.
Quote:
Originally Posted by SilentHuntR
Посмотреть сообщение
Unless weapons/ammo loadout is specified when using AddPlayerClass(...), then the only difference in classes is the Skin ID, just load that...
Could you show me a code example?
Reply
#8

Nvm, I did this another way.. But now I have another problem:
https://sampforum.blast.hk/showthread.php?pid=1162105#pid1162105
Would you bother checking?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)