Sziasztok! Végre létre hoztam az elsõ scriptemet! Remélem valakinek segitek vele!
Elkészülési idõ : 6 vagy 7 perc
Ezt a scriptet kamionos és RP szerverekre készitettem.
Ez a FileScript tesztelve volt!
/*\\----------------------------------------------------------------
-------------------------RANK-SYSTEM-------------------------------
--------------------------by-Zalakaka45--------------------------------
----------------------------------------------------------------\\*/
// |
// |
// |
// |
// |
// V
#include \"a_samp\"
new Text:playerscoretext;
new Text:playerscoretext2;
new Text:playerscoretext3;
new Text:playerscoretext4;
#define RANK1NAME \"Te egy kezdo vagy!\"//change name the way you wont(RANK1)
#define RANK2NAME \"Te a kozepes szinten vagy!\"//change name the way you wont(RANK2)
#define RANK3NAME \"Te vagy az ev jatekosa!\"//change name the way you wont(RANK3)
#define RANK4NAME \"Te vagy az ev kiralya!\"//change name the way you wont(RANK4)
#define RANK1SCOREa 0 // Te egy kezdo vagy 0 pontal!
#define RANK1SCOREb 99 // to 99 score
#define RANK2SCOREa 100// Te a 2. szinten vagy 100 pontal!
#define RANK2SCOREb 249// to 249 score
#define RANK3SCOREa 250// Te a 3. szinten vagy 250 pontal!
#define RANK3SCOREb 999// to 999 score
#define RANK4SCORE 1000// Te a 4. szinten vagy 1000$ al es 1000 pontal!
public OnFilterScriptInit()
{
playerscoretext3 = TextDrawCreate(413.0,103.0,RANK3NAME);
playerscoretext4 = TextDrawCreate(413.0,103.0,RANK4NAME);
playerscoretext = TextDrawCreate(413.0,103.0,RANK1NAME);
playerscoretext2 = TextDrawCreate(413.0,103.0,RANK2NAME);
SendClientMessageToAll(0xFFFF00FF,\"Rank System by Zalakaka45 Loaded!\");
return 1;
}
public OnFilterScriptExit()
{
TextDrawDestroy(playerscoretext);
TextDrawDestroy(playerscoretext2);
TextDrawDestroy(playerscoretext3);
TextDrawDestroy(playerscoretext4);
SendClientMessageToAll(0xFFFF00FF,\"Rank System by Zalakaka45 Unloaded!\");
return 1;
}
public OnPlayerUpdate(playerid)
{
if GetPlayerScore(playerid) >= RANK1SCOREa && GetPlayerScore(playerid) <=RANK2SCOREb*then
{
TextDrawUseBox(playerscoretext, 1);
TextDrawBoxColor(playerscoretext, 0x000000FF);
TextDrawSetShadow(playerscoretext,0);
TextDrawShowForPlayer(playerid, playerscoretext);
TextDrawHideForPlayer(playerid, playerscoretext2);
TextDrawHideForPlayer(playerid, playerscoretext3);
TextDrawHideForPlayer(playerid, playerscoretext4);
}
if GetPlayerScore(playerid) >= RANK2SCOREa && GetPlayerScore(playerid) <=RANK2SCOREb*then
{
TextDrawUseBox(playerscoretext2, 1);
TextDrawBoxColor(playerscoretext2, 0x000000FF);
TextDrawSetShadow(playerscoretext2,0);
TextDrawShowForPlayer(playerid, playerscoretext2);
TextDrawHideForPlayer(playerid, playerscoretext);
TextDrawHideForPlayer(playerid, playerscoretext4);
TextDrawHideForPlayer(playerid, playerscoretext3);
}
if GetPlayerScore(playerid) >= RANK3SCOREa && GetPlayerScore(playerid) <=RANK3SCOREb*then
{
TextDrawUseBox(playerscoretext3, 1);
TextDrawBoxColor(playerscoretext3, 0x000000FF);
TextDrawSetShadow(playerscoretext3,0);
TextDrawShowForPlayer(playerid, playerscoretext3);
TextDrawHideForPlayer(playerid, playerscoretext);
TextDrawHideForPlayer(playerid, playerscoretext2);
TextDrawHideForPlayer(playerid, playerscoretext4);
}
if GetPlayerScore(playerid) >= RANK4SCORE*then
{
TextDrawUseBox(playerscoretext4, 1);
TextDrawBoxColor(playerscoretext4, 0x000000FF);
TextDrawSetShadow(playerscoretext4,0);
TextDrawShowForPlayer(playerid, playerscoretext4);
TextDrawHideForPlayer(playerid, playerscoretext);
TextDrawHideForPlayer(playerid, playerscoretext2);
TextDrawHideForPlayer(playerid, playerscoretext3);
}
return 1;
}
public OnPlayerDeath(playerid)
{
TextDrawHideForPlayer(playerid, playerscoretext);
TextDrawHideForPlayer(playerid, playerscoretext2);
TextDrawHideForPlayer(playerid, playerscoretext3);
TextDrawHideForPlayer(playerid, playerscoretext4);
return 1;
}
// A
// |
// |
// |
// |
// |
/*\\----------------------------------------------------------------
-------------------------RANK-SYSTEM-------------------------------
--------------------------by-Zalakaka45--------------------------------
----------------------------------------------------------------\\*
[code*][*/code] használata kötelezõ! Erre figyelj oda