Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ================================================================================
- _ _
- | | | |
- | |__| |_ ____ _ _ __ __ _
- | __ \ \ /\ / / _` | '_ \ / _` |
- | | | |\ V V / (_| | | | | (_| |
- |_| |_| \_/\_/ \__,_|_| |_|\__, |
- __/ |
- |___/
- Sistem:
- - Renk Testi
- Kodlandı:
- - 09/01/2016
- Hesaplar:
- - www.facebook.com/EmirKoseoglu99
- - www.twitter.com/EmirKoseoglu99
- - www.gtaturk.com/forum/profile/1011248
- ================================================================================
- */
- #include <a_samp>
- #if !defined w
- #define w "{fffffF}"
- #endif
- enum _rTestInf
- {
- bool: Durum,
- Timer, Timer2,
- Skor,
- Para,
- Renk, strRenk[56]
- };
- new RenkTest[_rTestInf];
- public OnFilterScriptInit()
- {
- print("Renk Testi Yüklendi.");
- RenkTest[Timer] = SetTimer("ColorTest", 180000, true);
- return true;
- }
- public OnFilterScriptExit()
- {
- KillTimer(RenkTest[Timer2]);
- KillTimer(RenkTest[Timer]);
- return true;
- }
- public OnPlayerText(playerid, text[]){
- if(!strcmp(RenkTest[strRenk], text, true))
- {
- if(RenkTest[Durum] == true)
- {
- new pname[MAX_PLAYER_NAME], string[176];
- GetPlayerName(playerid, pname, sizeof pname);
- format(string, sizeof string, "{FBEC5D}[RenkTesti] "w"Oyuncu {%06x}%s "w"testi kazandı. [Renk: {%06x}%s"w"]", RenkTest[Renk] >>> 8, pname, RenkTest[Renk] >>> 8, RenkTest[strRenk]);
- SendClientMessageToAll(-1, string);
- GivePlayerMoney(playerid, RenkTest[Para]);
- SetPlayerScore(playerid, GetPlayerScore(playerid)+RenkTest[Skor]);
- ColorTestEnd();
- }
- }
- return true;
- }
- forward ColorTest(); public ColorTest(){
- new string[156];
- switch(random(9))
- {
- case 0: format(RenkTest[strRenk], 56, "Kırmızı"), RenkTest[Renk] = 0xFF0000FF; //Kırmızı
- case 1: format(RenkTest[strRenk], 56, "Mavi"),RenkTest[Renk] = 0x1E90FFFF; //Mavi
- case 2: format(RenkTest[strRenk], 56, "Sarı"),RenkTest[Renk] = 0xFFFF00FF; //Sarı
- case 3: format(RenkTest[strRenk], 56, "Yeşil"),RenkTest[Renk] = 0x009000FF; //Yeşil
- case 4: format(RenkTest[strRenk], 56, "Turuncu"),RenkTest[Renk] = 0xFFA500FF; //Turuncu
- case 5: format(RenkTest[strRenk], 56, "Lacivert"),RenkTest[Renk] = 0x120A8FFF; //Lacivert
- case 6: format(RenkTest[strRenk], 56, "Turkuaz"),RenkTest[Renk] = 0x30D5C8ff; //Turkuaz
- case 7: format(RenkTest[strRenk], 56, "Pembe"),RenkTest[Renk] = 0xEE82EEFF; //Pembe
- case 8: format(RenkTest[strRenk], 56, "Mor"),RenkTest[Renk] = 0x660099FF; //Mor
- }
- RenkTest[Para] = (random(8000)+7000);
- RenkTest[Skor] = (random(2)+1);
- format(string, sizeof string, "{FBEC5D}[RenkTesti] "w"Bu {%06x}renk "w"hangi renktir? - Ödül: {FBEC5D}$%i + %i skor", RenkTest[Renk] >>> 8, RenkTest[Para], RenkTest[Skor]);
- SendClientMessageToAll(-1, string);
- RenkTest[Durum] = true;
- KillTimer(RenkTest[Timer]);
- KillTimer(RenkTest[Timer2]);
- RenkTest[Timer2] = SetTimer("ColorTestEnd", 30000, false);
- return true ;
- }
- forward ColorTestEnd(); public ColorTestEnd(){
- if(RenkTest[Durum] == true)
- {
- KillTimer(RenkTest[Timer2]);
- RenkTest[Durum] = false;
- RenkTest[Timer] = SetTimer("ColorTest", 180000, true);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement