SA-MP Forums Archive
Accessing Variables... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Accessing Variables... (/showthread.php?tid=149269)



Accessing Variables... - DJDhan - 21.05.2010

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


Re: Accessing Variables... - Norck - 21.05.2010

Use PVars?


Re: Accessing Variables... - DJDhan - 21.05.2010

Thank You

Now I have to see how to use it with my filterscript as i use dini


Re: Accessing Variables... - Norck - 21.05.2010

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 Код:
//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 Код:
//In your GM
if(GetPVarInt(playerid,"SkillLevel") == 5)//If playa got 5th skill level (just for example)
{
//Give a weapon that you need here
}



Re: Accessing Variables... - DJDhan - 21.05.2010

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