SA-MP Forums Archive
RW: Please help me!!! - 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)
+--- Thread: RW: Please help me!!! (/showthread.php?tid=373848)



RW: Please help me!!! - Magic_Time - 31.08.2012

Hi,
Can someone here help me to do a function like this:

Код:
GetPlayerDeaths(playerid);
Код:
GetPlayerKills(playerid);
Код:
GetAdminLevel(playerid);
If someone can help me, thanks.


Re: RW: Please help me!!! - SupaVZ - 31.08.2012

try make those as a commands.


Re: RW: Please help me!!! - C00K13M0N$73R - 31.08.2012

Do you use a file saving system?


Re: RW: Please help me!!! - Magic_Time - 31.08.2012

No No.....

I want it for a Texdraw...


Re: RW: Please help me!!! - mamorunl - 31.08.2012

pawn Код:
static GetPlayerKills(playerid) {
    return kills[playerid];
}
seriously though, you will need to give more info about the way you save that data.


Re: RW: Please help me!!! - Magic_Time - 31.08.2012

Nope.....

I'm using the savedata as Filterscript....

I just want the code...
GetPlayerKills, GetPlayerDeaths....
....

They are in the folder scriptfiles...


Re: RW: Please help me!!! - Johnson_Brooks - 01.09.2012

what do you exactly need?
we cannot understand ..
To save the player's kill/deaths and get them via that function or...
CMON..


Re: RW: Please help me!!! - JaKe Elite - 01.09.2012

To do that you need register/login system.



We cannot understand what you mean.

You need textdraw editor.
Register System.
and some little knowledge in scripting.


Re: RW: Please help me!!! - mamorunl - 01.09.2012

Quote:
Originally Posted by Magic_Time
Посмотреть сообщение
Nope.....

I'm using the savedata as Filterscript....

I just want the code...
GetPlayerKills, GetPlayerDeaths....
....

They are in the folder scriptfiles...
I am still not entirely sure what you mean. In what way are you fetching his kills, deaths et cetera?


Re: RW: Please help me!!! - Xenoyia - 01.09.2012

Assuming you don't have a register system, you'll need a temporary storage, so make a new enum and a variable before ongamemodeinit:

pawn Код:
enum PlayerInfo
{
Kills,
Deaths
};

new TempInfo[MAX_PLAYERS][PlayerInfo];
OnPlayerConnect:

pawn Код:
TempInfo[playerid][Deaths] = 0;
TempInfo[killerid][Kills] = 0;
OnPlayerDeath:

pawn Код:
TempInfo[playerid][Deaths] ++;
TempInfo[killerid][Kills] ++;
OnPlayerDisconnect:

pawn Код:
TempInfo[playerid][Deaths] = 0;
TempInfo[killerid][Kills] = 0;
That'll store all kill/death data until you disconnect.