SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 08/10/2016, 09:34 AM   #1
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Storing a value.

Hi. So i made wanted levels it works now can i somehow save a player's wanted level into something onplayerdisconnect? and set the same wanted level[the level on which he left] on him when he joins ?
__________________
StrikerZ is offline   Reply With Quote
Old 08/10/2016, 09:36 AM   #2
alexanderjb918
Huge Clucker
 
alexanderjb918's Avatar
 
Join Date: Dec 2013
Location: Pawno
Posts: 324
Reputation: 21
Default Re: Storing a value.

Save it with his pdata?
alexanderjb918 is offline   Reply With Quote
Old 08/10/2016, 09:38 AM   #3
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Storing a value.

I'm not using any enum for wanted level.Just SetPlayerWantedLevel and GetPlayerWantedLevel
__________________
StrikerZ is offline   Reply With Quote
Old 08/10/2016, 09:43 AM   #4
iLearner
Guest
 
Posts: n/a
Default Re: Storing a value.

He means... do you have a enum for playerdata? in that enum create a var and store it in it and save it on your save fuction & load it on your load func
  Reply With Quote
Old 08/10/2016, 09:59 AM   #5
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: Asgard
Posts: 1,050
Reputation: 154
Default Re: Storing a value.

Ah.. Aight. So i did this. new disable[MAX_PLAYERS] added pWantedLevel in playerinfo enum.under OnPlayerDisconnect Disable = GetPlayerWantedLevel(playerid); and PlayerInfo[playerid][pWantedLevel] = PlayerInfo[playerid][pWantedLevel]+Disable; will it work?
__________________
StrikerZ 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
Help with enum, and storing Sc0pion Scripting Help 3 16/07/2015 06:10 AM
Storing a vaule Abreezy Scripting Help 4 25/02/2012 08:19 PM
PASSENGER ID STORING SpankMe2 Help Archive 3 23/08/2011 03:44 PM
armor storing on gui jaksimaksi Help Archive 3 07/08/2011 07:40 PM
Storing name. TheFailFactor Help Archive 1 07/10/2009 06:14 PM


All times are GMT. The time now is 06:02 AM.


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