Nawyus 2 Odesláno: 17. Červen, 2013 Share Odesláno: 17. Červen, 2013 Ahoj, představuji vám můj další výtvor - Easy-FS (v1.0) .... Obrázky sem dám až někdy jindy ,protože teď nemám přístup ke svému PC Zde máte Kod // Jednoduchý FS pro nováčky v Pawnu // Easy-FS by Perjour // Vše je tak nějak jednoduše popsáno ... // Ve hře ... pro zobrazení všech příkazů tohoto Filtescriptu [ /easyfs ] /* . . . . . */ // Verze 1.0 #include <a_samp> //===== Barvy Nicků ======// #define COLOR_BLUE 0x0000BBAA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_PINK 0xFFC0CBAA #define COLOR_RED 0xFF0000AA //=======================// #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Easy-FilterScript by Perjour "); print(" Nacteno "); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { print("\n--------------------------------------"); print(" Easy-FilterScript by Perjour "); print(" Nenacteno!!! "); print("--------------------------------------\n"); return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/buyhp", cmdtext, true, 10) == 0) // Hráč si koupí životy za určitou částku { SetPlayerHealth(playerid, 100); // Nastaví hráči životy na 100 GivePlayerMoney(playerid, -500); // Jakmile hráč použije tento příkaz přidají se mu životy a odečte 500$ SendClientMessage(playerid, 0xFFFFFFAA, "Zakoupil jsis 100hp [500$]"); return 1; } // ScoreShop if (strcmp("/scoreshop", cmdtext, true, 10) == 0) // Dialog s možností koupě score { ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Obchod se Scorem","[ /buyscore1 ] - 10 Score [10.000$]\n[ /buyscore2 ] - 50 Score [50.000$]\n[ /buyscore3 ] - 100 Score [100.000$]","OK",""); // Samotný Dialog .... MSGBOX = zobrazí se pouze TEXT return 1; } if (strcmp("/buyscore1", cmdtext, true, 10) == 0) // Hráč si koupí Score za určitou částku { SetPlayerScore(playerid, GetPlayerScore(playerid) +10); // Přidá hráči score ( +10 ) GivePlayerMoney(playerid, -10000); // Jakmile hráč použije tento příkaz odečte 10.000$ SendClientMessage(playerid, 0xFFFFFFAA, "Zakoupil jsis 10 Score [10.000$]"); return 1; } if (strcmp("/buyscore2", cmdtext, true, 10) == 0) { SetPlayerScore(playerid, GetPlayerScore(playerid) +50); GivePlayerMoney(playerid, -50000); SendClientMessage(playerid, 0xFFFFFFAA, "Zakoupil jsis 50 Score [50.000$]"); return 1; } if (strcmp("/buyscore3", cmdtext, true, 10) == 0) { SetPlayerScore(playerid, GetPlayerScore(playerid) +100); GivePlayerMoney(playerid, -100000); SendClientMessage(playerid, 0xFFFFFFAA, "Zakoupil jsis 100 Score [100.000$]"); return 1; } // -ScoreShop- //===== Barvy Nicků =====// if (strcmp("/barvy", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Barvy","/cervena - Změní ti barvu nicku na Červenou\n/modra - Změní ti barvu nicku na Modrou\n/bila - Změní ti barvu nicku na Bílou\n/ruzova - Změní ti barvu nicku na Růžovou","Ok",""); // Samotný Dialog .... MSGBOX = zobrazí se pouze TEXT return 1; } if (strcmp("/cervena", cmdtext, true, 10) == 0) //Hráč si změní barvu Nicku za 3 score ... [ -3 Score ] { SetPlayerColor(playerid,COLOR_RED); SetPlayerScore(playerid, GetPlayerScore(playerid) -3); SendClientMessage(playerid, 0xFF0000AA, "Daj jsis červenou barvu Nicku"); return 1; } if (strcmp("/modra", cmdtext, true, 10) == 0) { SetPlayerColor(playerid,COLOR_BLUE); SetPlayerScore(playerid, GetPlayerScore(playerid) -3); SendClientMessage(playerid, 0x0000BBAA, "Daj jsis modrou barvu Nicku"); return 1; } if (strcmp("/bila", cmdtext, true, 10) == 0) { SetPlayerColor(playerid,COLOR_WHITE); SetPlayerScore(playerid, GetPlayerScore(playerid) -3); SendClientMessage(playerid, 0xFFFFFFAA, "Daj jsis bílou barvu Nicku"); return 1; } if (strcmp("/ruzova", cmdtext, true, 10) == 0) { SetPlayerColor(playerid,COLOR_PINK); SetPlayerScore(playerid, GetPlayerScore(playerid) -3); SendClientMessage(playerid, 0xFFC0CBAA, "Daj jsis růžovou barvu Nicku"); return 1; } //===== -Barvy Nicků- =====// //===== Ostatní =====// if (strcmp("/opravit", cmdtext,(playerid, params[])) // Hráč si opraví vozidlo { new Float:x, Float:y, Float:z; PlayerPlaySound(playerid, 1133, x, y, z); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Nejsi ve vozidle!"); // hráč není v autě RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, COLOR_WHITE, "Opravil jsis auto!"); // příkaz opraví hráči auto za 5000$ GivePlayerMoney(playerid, -5000); return 1; } if (strcmp("/easyfs", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid,456,DIALOG_STYLE_MSGBOX,"Easy-FS by Perjour","{00FFFF}/scoreshop - Seznam v kterém si můžete zakoupit Score za herní peníze\n{00FFFF}/barvy - Seznam barev ,kterými si můžete změnit barvu nicku\n{00FFFF}/opravit - Opravíte si vozidlo\n{00FFFF}/buyhp - za 500$ si zakoupíte životy","Ok",""); return 1; } //===== -Ostatní- =====// return 0; } #endif Příkaz ve hře: /easyfs Download: (Klik) Autor: Perjour Verze: 1.0 Link to comment Share on other sites More sharing options...
Administrátor Ewwe 434 Odesláno: 17. Červen, 2013 Administrátor Share Odesláno: 17. Červen, 2013 Neumíme s parametrama v příkazech ? Link to comment Share on other sites More sharing options...
Nawyus 2 Odesláno: 17. Červen, 2013 Author Share Odesláno: 17. Červen, 2013 Umíme ,ale dělal jsem to tak trochu narychlo .... Link to comment Share on other sites More sharing options...
Administrátor Ewwe 434 Odesláno: 17. Červen, 2013 Administrátor Share Odesláno: 17. Červen, 2013 Jinak nechci rejpat ale ten fs bude nefunkční Do doby než přidáš #define filterscript nebo odebereš tu podmínku Link to comment Share on other sites More sharing options...
Nawyus 2 Odesláno: 17. Červen, 2013 Author Share Odesláno: 17. Červen, 2013 Šak .... #if defined FILTERSCRIPT Link to comment Share on other sites More sharing options...
Administrátor Ewwe 434 Odesláno: 17. Červen, 2013 Administrátor Share Odesláno: 17. Červen, 2013 Šak .... #if defined FILTERSCRIPT No to je podmínka... a musel by jsi tam mít někde nad tím #define FILTERSCRIPT aby podmínka nabyla platnosti To je jako když si dáš podmínku if mám5jablek dostane 500,- ale měl by si 3 jabka a chtěl by si pětikilo Link to comment Share on other sites More sharing options...
Albus Brambůrek 41 Odesláno: 17. Červen, 2013 Share Odesláno: 17. Červen, 2013 :d No tak to je něco Link to comment Share on other sites More sharing options...
TheRohlikar 21 Odesláno: 17. Červen, 2013 Share Odesláno: 17. Červen, 2013 "print(" Nenacteno!!! ");" - V "OnFilterScriptExit" se nepíše, jestli se načte, bo ne.. Ale když se ukončí. ( Si myslím ) Link to comment Share on other sites More sharing options...
Administrátor Ewwe 434 Odesláno: 17. Červen, 2013 Administrátor Share Odesláno: 17. Červen, 2013 "print(" Nenacteno!!! ");" - V "OnFilterScriptExit" se nepíše, jestli se načte, bo ne.. Ale když se ukončí. ( Si myslím ) +1 Holt tu není reputace no...... Link to comment Share on other sites More sharing options...
Nawyus 2 Odesláno: 17. Červen, 2013 Author Share Odesláno: 17. Červen, 2013 Ajo ... Link to comment Share on other sites More sharing options...
TheRohlikar 21 Odesláno: 17. Červen, 2013 Share Odesláno: 17. Červen, 2013 Od Ewwíka potěší.. Ináč - Ty barvy nicku jsi mohl hodit do jednoduchého dialogu.. Mnohem kratší.. ( Optimalizace kódu, jednoduší funkčnost ).. // Ono tak nějak všechno xD Link to comment Share on other sites More sharing options...
Nawyus 2 Odesláno: 17. Červen, 2013 Author Share Odesláno: 17. Červen, 2013 Tak ok .... :d díky všem co mě poradili ... teď vše funguje a už to mám i v dialogu ... Link to comment Share on other sites More sharing options...
Nawyus 2 Odesláno: 17. Červen, 2013 Author Share Odesláno: 17. Červen, 2013 Jo šak dobrý Link to comment Share on other sites More sharing options...
TheRohlikar 21 Odesláno: 17. Červen, 2013 Share Odesláno: 17. Červen, 2013 Péro - Pojď na Skype.. Něco ti pošlu xD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now