Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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
- 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)));
- 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, PlayerName, MAX_PLAYERS);//linha 47
- return PlayerName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement