CMD:stats(playerid,params[]) { new string[428], sLine[34], pDeaths, player1, h, m, s; if (!strlen(params)) player1 = playerid; else player1 = strval(params); if (IsPlayerConnected(player1)) { TotalGameTime(player1, h, m, s); if (PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths]; format(sLine, sizeof(sLine), "{fff000}+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"); format(string, sizeof(string), "%s {FC0303}%s's Stats %s \n*Player Kills: %d \n*Player Deaths: %d \n*Player Ratio: %0.2f \n*Player Money: $%d \nSkin: %d \nScore: %d \nAdmin Level: %d \nPing: %d \nBank: $%d \nWanted Level: %d \nInterior: %d \nCountry: %s", sLine, PlayerName2(player1), sLine, PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), GetPlayerSkin(player1), GetPlayerScore(player1), PlayerInfo[player1][Level], GetPlayerPing(player1), PlayerInfo[player1][bank], GetPlayerWantedLevel(player1), GetPlayerInterior(player1), GetPlayerCountryName(playerid) ); return ShowPlayerDialog(playerid, 758, 0, "[YS]Player Stats", string, "Ok", ""); } else SendClientMessage(playerid, red, "Player Not Connected!"); return 1; }
CMD:rules(playerid,params[])
{
new string[500];
string = "1.Do not jack other's car while they are exchanging or buying Vehicle.\n";
strcat(string, "2.Exchange car's only with the present of server Admin . To see online admins /admins\n\
3.Do not use bad words.\n\
4.Do not advetise.\n\
6.Do not use any kind of hacks.\n\
7.You can use car mods only.\n\
9.rules*
10.rules
11.rules
12.rules
13.rules
14.rules
17.rules
18.rules
19.Do not Spam the server Chat.");
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{46BEE6}YS Server Credits:", string, "I Agree", "I Disagree");
return 1;
}
CMD:rules(playerid,params[])
{
SendClientMessage(playerid, -1, "1.Do not jack other's car while they are exchanging or buying Vehicle.");
SendClientMessage(playerid, -1, "2.Exchange car's only with the present of server Admin . To see online admins /admins");
return 1;
}
// -1 = the color (WHITE) , for more lines, just add another line like this:
// SendClientMessage(playerid, -1, "Your Text here.");
CMD:stats(playerid)
{
new string[428], sLine[34], pDeaths, h, m, s;
TotalGameTime(playerid, h, m, s);
if (PlayerInfo[playerid][Deaths] == 0) pDeaths = 1;
else pDeaths = PlayerInfo[playerid][Deaths];
format(sLine, sizeof(sLine), "{fff000}+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+");
format(string, sizeof(string), "%s {FC0303}%s's Stats %s \n*Player Kills: %d \n*Player Deaths: %d \n*Player Ratio: %0.2f \n*Player Money: $%d \nSkin: %d \nScore: %d \nAdmin Level: %d \nPing: %d \nBank: $%d \nWanted Level: %d \nInterior: %d \nCountry: %s",
sLine,
PlayerName2(playerid),
sLine,
PlayerInfo[playerid][Kills],
PlayerInfo[playerid][Deaths],
Float:PlayerInfo[playerid][Kills]/Float:pDeaths,
GetPlayerMoney(playerid),
GetPlayerSkin(playerid),
GetPlayerScore(playerid),
PlayerInfo[playerid][Level],
GetPlayerPing(playerid),
PlayerInfo[playerid][bank],
GetPlayerWantedLevel(playerid),
GetPlayerInterior(playerid),
GetPlayerCountryName(playerid)
);
return ShowPlayerDialog(playerid, 758, 0, "[YS]Your Stats", string, "Ok", "");
}
CMD:rules(playerid)
{
new PT[1000];
strcat(PT, "{FFFFFF}>: Rule 1 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 2 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 3 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 4 \n", sizeof(PT));
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{46BEE6}YS Server Rules:", PT, "I Agree", "I Disagree");
return 1;
}
CMD:rules(playerid,params[])
{
new string[500];
string = "1.Do not jack other's car while they are exchanging or buying Vehicle.\n";
strcat(string, "2.Exchange car's only with the present of server Admin . To see online admins /admins\n\
3.Do not use bad words.\n\
4.Do not advertise.\n\
6.Do not use any kind of hacks.\n\
7.You can use car mods only.\n\
9.rules*
10.rules
11.rules
12.rules
13.rules
14.rules
17.rules
18.rules
19.Do not Spam the server Chat.
20.If you post codes on SA-MP server, use [ pawn ] tags.");
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{46BEE6}YS Server Credits:", string, "I Agree", "I Disagree");
return 1;
}
strcat(PT, "{FFFFFF}>: Rule ? \n", sizeof(PT));
CMD:rules(playerid)
{
new PT[1000];
strcat(PT, "{FFFFFF}>: Rule 1 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 2 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 3 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule 4 \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule ? \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule ? \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule ? \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule ? \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule ? \n", sizeof(PT));
strcat(PT, "{00FF00}>: Rule ? \n", sizeof(PT));
// and continues
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "{46BEE6}YS Server Rules:", PT, "I Agree", "I Disagree");
return 1;
}
simple only copy this
pawn Код:
example pawn Код:
|