23.04.2010, 21:55
pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <Dini>
#if defined FILTERSCRIPT
#pragma unused PlayerName
public OnFilterScriptInit()
{
if(!fexist("score.ini")) dini_Create("score.ini");
if(!fexist("Weapon.ini")) dini_Create("Weapon.ini");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
}
#endif
public OnPlayerConnect(playerid)
{
if(dini_Isset("Weapon.ini",PlayerName(playerid))) GivePlayerWeapon(playerid,dini_Int("Weapon.ini",PlayerName(playerid)));//linha 33
if(dini_Isset("score.ini",PlayerName(playerid))) SetPlayerScore(playerid,dini_Int("score.ini",PlayerName(playerid)));
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
dini_IntSet("score.ini",PlayerName(playerid),GetPlayerScore(playerid));
dini_IntSet("Weapon.ini",PlayerName(playerid),GetPlayerWeapon(playerid));
return 1;
}
PlayerName(playerid) {
new PlayerName[MAX_PLAYERS];//linha 46
GetPlayerName(playerid, NPlayerName, MAX_PLAYERS);//linha 47
return PlayerName;
}