Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Filterscript Zlato By PinkPanter
- NAPOMENA: Morate imati u scriptfiles "Korisnici" Folder !
- */
- //==== [ INCLUDE ] ====//
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- #include <YSI\y_ini>
- //==== [ DEFINE ] ====//
- #define PATH "/Korisnici/%s.ini"
- #define COL_SERVER "{FF8000}"
- #define SCM SendClientMessage
- #define BELA "{FFFFFF}"
- #define CRVENA 0xFF0000FF
- //==== [ ENUM ] ====//
- enum pInfo
- {
- pZlato,
- pNovac
- }
- //==== [ NEW ] ====//
- new PlayerInfo[MAX_PLAYERS][pInfo];
- //==== [ STOCK ] ====//
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- //==== [ PUBLIC ] ====//
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Zlato",PlayerInfo[playerid][pZlato]);
- INI_Int("Novac",PlayerInfo[playerid][pNovac]);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- return 1;
- }
- //==== [ CMD ] ====//
- CMD:kupizlato(playerid, params[])
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_WriteInt(File, "Novac", GetPlayerMoney(playerid));
- INI_Close(File);
- new novacdinari = GetPlayerMoney(playerid);
- new zlatocena;
- zlatocena = PlayerInfo[playerid][pNovac] = 1300;
- if(novacdinari < zlatocena) return SCM(playerid, -1, ""COL_SERVER"[System By PinkPnater] "BELA"Nemate dovoljno novca !");
- else
- {
- SCM(playerid, -1, ""COL_SERVER"[System By PinkPnater] "BELA"Kupili ste 1g zlata !");
- GivePlayerMoney(playerid, -1300);
- PlayerInfo[playerid][pZlato] += 1;
- }
- return 1;
- }
- CMD:prodajzlato(playerid, params[])
- {
- if(PlayerInfo[playerid][pZlato] == 0) return SCM(playerid, -1, ""COL_SERVER"[System By PinkPnater] "BELA"Nemate zlato !");
- else
- {
- SCM(playerid, -1, ""COL_SERVER"[System By PinkPnater] "BELA"Prodali ste 1g zlata !");
- GivePlayerMoney(playerid, 1250);
- PlayerInfo[playerid][pZlato] -= 1;
- }
- return 1;
- }
- CMD:zlatarainfo(playerid, params[])
- {
- SCM(playerid, -1, ""COL_SERVER"[System By PinkPnater] "BELA"Zlatara info Kupovina zlata 1300 I Prodaja zlata 1250 !");
- return 1;
- }
- CMD:pjesma(playerid, params[], help)
- {
- PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/o3w0ooxnsg/Jala_Brat_x_Buba_Corelli_-_Klinka_Official_Lyric_Video_.mp3");
- return 1;
- }
- CMD:money(playerid, params[], help) {
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
- GivePlayerMoney(playerid,300000);
- return 1;
- }
- CMD:mute(playerid, params[], help) {
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
- SendClientMessage(playerid,CRVENA,"Koristi /mute ID/NICK Minute RAZLOG!");
- return 1;
- }
- //======================= [ KRAJ FS ZLATO SYSTEM BY PinkPanter ] ==================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement