11.12.2012, 03:58
hello
How do I add a system for the payment actually I want when a player reaches a certain rank receives payment
tnx for answer
How do I add a system for the payment actually I want when a player reaches a certain rank receives payment
tnx for answer
Код:
#include "a_samp" new Text:playerscoretext; new Text:playerscoretext2; new Text:playerscoretext3; new Text:playerscoretext4; #define RANK1NAME "You are ~y~Trucker"//change name the way you wont(RANK1) #define RANK2NAME "You are ~y~BestTrucker"//change name the way you wont(RANK2) #define RANK3NAME "You are ~y~King of the Road"//change name the way you wont(RANK3) #define RANK4NAME "You are ~y~Tycoon"//change name the way you wont(RANK4) #define RANK1SCOREa 0 // you are rank1 from 0 score #define RANK1SCOREb 99 // to 99 score #define RANK2SCOREa 100// you are rank2 from 100 score #define RANK2SCOREb 249// to 249 score #define RANK3SCOREa 250// you are rank3 from 250 score #define RANK3SCOREb 999// to 999 score #define RANK4SCORE 1000// you are rank4 from 1000+ score 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 wumpyc LOADED!"); return 1; } public OnFilterScriptExit() { TextDrawDestroy(playerscoretext); TextDrawDestroy(playerscoretext2); TextDrawDestroy(playerscoretext3); TextDrawDestroy(playerscoretext4); SendClientMessageToAll(0xFFFF00FF,"Rank system by wumpyc 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); GivePlayerMoney(50000); } 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; }