SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 21/05/2010, 02:36 PM   #1
DJDhan
High-roller
 
DJDhan's Avatar
 
Join Date: Oct 2009
Location: Canada
Posts: 1,150
Reputation: 6
Default Accessing Variables...

Hi there,
I save the Kills and Deaths, and Skill Level in my admin filterscript. And my teams are in my gamemode.
Now OnPlayerSpawn, i want to give player weapons based on their skill level and team they choose.

That's the problem, I can't check for the player's team from the filterscript and can't get the Kills,Deaths and Skill Level from the filterscript

Is there a way to make an include which tells the location of the Kills and Skill Level so i can access them from my gamemode? Or is there any other way? Pls Help
__________________
DJDhan is offline  
Old 21/05/2010, 04:35 PM   #2
Norck
Huge Clucker
 
Norck's Avatar
 
Join Date: Aug 2008
Location: Ukraine, Simferopol
Posts: 388
Reputation: 43
Default Re: Accessing Variables...

Use PVars?
__________________
Releases: fly.inc
Norck is offline  
Old 21/05/2010, 04:41 PM   #3
DJDhan
High-roller
 
DJDhan's Avatar
 
Join Date: Oct 2009
Location: Canada
Posts: 1,150
Reputation: 6
Default Re: Accessing Variables...

Thank You

Now I have to see how to use it with my filterscript as i use dini
__________________
DJDhan is offline  
Old 21/05/2010, 05:27 PM   #4
Norck
Huge Clucker
 
Norck's Avatar
 
Join Date: Aug 2008
Location: Ukraine, Simferopol
Posts: 388
Reputation: 43
Default Re: Accessing Variables...

Quote:
Originally Posted by DJDhan
Thank You
Np
Quote:
Originally Posted by DJDhan
Now I have to see how to use it with my filterscript as i use dini
I never used dini, so i can't give you a whole example.
But i can say that you should put a deaths/kills/skill levels from your file right to the P'variable, like:
pawn Code:
//In your FS
SetPVarInt(playerid,"SkillLevel",value);//value = Info about Skill Level from your file
And check a skill level when player is spawn:
pawn Code:
//In your GM
if(GetPVarInt(playerid,"SkillLevel") == 5)//If playa got 5th skill level (just for example)
{
//Give a weapon that you need here
}
__________________
Releases: fly.inc
Norck is offline  
Old 21/05/2010, 06:25 PM   #5
DJDhan
High-roller
 
DJDhan's Avatar
 
Join Date: Oct 2009
Location: Canada
Posts: 1,150
Reputation: 6
Default Re: Accessing Variables...

Wow thanks for you help Sinyavski but I decided to use CallRemoteFunction instead and it works
Because I didn't see your reply :P Although I'll use PVar sometime
__________________
DJDhan is offline  
 

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]Variables Naxix Help Archive 3 17/04/2010 08:47 AM
variables 3 min to 0 Rks25 Help Archive 3 17/05/2009 06:19 PM
Slight problems accessing the servers - Wiki didn't work Rtm Client Support 1 15/05/2009 12:10 PM
Need help with accessing string arrays iMr Help Archive 5 02/05/2009 01:17 PM


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


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