Sziasztok azzal fordulnék hozzátok hogy PPC modhoz van egy rank script-em és nem tudom hogy hova írjam bele hogyha level upol valaki kiírja neki chatbe. + PPC-nél ugye nem GivePlayerMoney van hanem RewardPlayer ezt hogy tudnám megoldani hogy a scriptbe is az legyen?
#include <a_samp>
#include <zcmd>
#include <streamer>
#include <sscanf2>
#pragma tabsize 0
#define COLOR_WHITE 0xffffffAA
#define COLOR_RED 0xff0000AA
#define COLOR_YELLOW 0xccb100AA
#define COLOR_BLUE 0x0015ffAA
#define COLOR_GREEN 0x1ccf00AA
new Text:Textdraw0;
new TRank [150];
enum
{
DIALOG_RANK
}
#define DIALOG_RANK 7000
CMD:rank(playerid, params[])
{
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
{
SendClientMessage(playerid, -1, \"{0dff00}A rankod {ffea00}Amatőr\");
}
if(GetPlayerScore(playerid) >= 101 && GetPlayerScore(playerid) <= 200)
{
SendClientMessage(playerid, -1, \"{0dff00}A rankod {ffea00}Haladó\");
}
if(GetPlayerScore(playerid) >= 201 && GetPlayerScore(playerid) <= 400)
{
SendClientMessage(playerid, -1, \"{0dff00}A rankod {ffea00}Menő\");
}
if(GetPlayerScore(playerid) >= 401 && GetPlayerScore(playerid) <= 800)
{
SendClientMessage(playerid, -1, \"{0dff00}A rankod {ffea00}Ügyes\");
}
if(GetPlayerScore(playerid) >= 801 && GetPlayerScore(playerid) <= 10000)
{
SendClientMessage(playerid, -1, \"{0dff00}A rankod {ffea00}Legendás\");
}
return 1;
}
CMD:rankok(playerid, params[])
{
ShowPlayerDialog(playerid, 7000, DIALOG_STYLE_MSGBOX, \"{ff0000}Rankok\", \"{0dff00}Rank 1 - {ffea00}Amatőr(0-100 pontig)\\n\\
-----------------------------\\n\\
{0dff00}Rank 2 {000000}- {ffea00}Haladó(101-200 pontig)\\n\\
-----------------------------\\n\\
{0dff00}Rank 3 {000000}- {ffea00}Menő(201-400 pontig)\\n\\
-----------------------------\\n\\
{0dff00}Rank 4 {000000}- {ffea00}Ügyes(401-800 pontig)\\n\\
-----------------------------\\n\\
{0dff00}Rank 5 {000000}- {ffea00}Legendás\", \"Rendben\", \"\");
return 1;
}
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(497, 118, \"Rankod:\");
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, Text:Textdraw0);
TextDrawColor(Text:Textdraw0, 0x03D687FF);
TextDrawFont(Text:Textdraw0, 1);
TextDrawSetShadow(Text:Textdraw0, 0);
return 1;
}
public OnPlayerUpdate( playerid )
{
if(GetPlayerScore(playerid) >= 801 && GetPlayerScore(playerid) <= 10000)
{
SetPlayerChatBubble(playerid, \"Legendas\",COLOR_YELLOW,40.0,1000);
}
else if(GetPlayerScore(playerid) >= 401 && GetPlayerScore(playerid) <= 800)
{
SetPlayerChatBubble(playerid, \"Ugyes\",COLOR_RED,40.0,1000);
}
else if(GetPlayerScore(playerid) >= 201 && GetPlayerScore(playerid) <= 400)
{
SetPlayerChatBubble(playerid, \"Meno\",COLOR_BLUE,40.0,1000);
}
else if(GetPlayerScore(playerid) >= 101 && GetPlayerScore(playerid) <= 200)
{
SetPlayerChatBubble(playerid, \"Halado\",COLOR_GREEN,40.0,1000);
}
else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
{
SetPlayerChatBubble(playerid, \"Amator\",COLOR_WHITE,40.0,1000);
}
new string[128];
if(GetPlayerScore(playerid) >= 800)
{
TRank = \"Legendas\";
}
else if(GetPlayerScore(playerid) >= 400)
{
TRank = \"Ugyes\";
}
else if(GetPlayerScore(playerid) >= 200)
{
TRank = \"Meno\";
}
else if(GetPlayerScore(playerid) >= 100)
{
TRank = \"Halado\";
}
else if(GetPlayerScore(playerid) >= 0)
{
TRank = \"Amator\";
}
format(string, sizeof string, \"~g~Rankod:~r~ %s\", TRank);
TextDrawSetString(Text:Textdraw0, string);
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
TextDrawHideForPlayer(playerid, Text:Textdraw0);
return 1;
}
public OnPlayerDeath(playerid)
{
TextDrawHideForPlayer(playerid, Text:Textdraw0);
return 1;
}