save team
#1

hi all
i want to aske yu guys ! do you know if it's posible to save the team of a player when he disconect
Reply
#2

Yes, use a file system and save the gTeam variable into the file, and when the player disconnects, reset the team, when the player connects, set the team.

Then when OnPlayerRequestClass is called, if the player's team was loaded and is not 255, spawn him automatically.

I'm not making the code for you, this is just an example. If you want the code, go here or just learn how to script here.
Reply
#3

Sure it is. Use Dini, or Y_Ini whatever you wanna use
Reply
#4

i've creat a "saveteam" it work perfectly (when i relog in the servre ! i still in tha same team !)
NOW probleme is if i close samp-server.exe & run it again ! the "saveteam" set the player to team 0 (not to the laste team )
any solution pls
Reply
#5

Quote:
Originally Posted by Amine_Mejrhirrou
Посмотреть сообщение
i've creat a "saveteam" it work perfectly (when i relog in the servre ! i still in tha same team !)
NOW probleme is if i close samp-server.exe & run it again ! the "saveteam" set the player to team 0 (not to the laste team )
any solution pls
Loop through all players using OnGameModeExit, then save the data and end the loop.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)