22.11.2018, 06:14
Quote:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS, "Turfs", "{a9c4e4}Turf\tOwner\tPerk\tVulnerability", string, "Close", "");
|
Here's the code:
pawn Код:
CMD:turfs(playerid, params[])
{
new string[5500];
new number = 0;
string = "Turf\tOwner\tPerk\tVulnerability";
for(new i; i < MAX_POINTS; i++)
{
if(Points[i][Type] >= 0)
{
number ++;
if(Points[i][Vulnerable] == -1)
{
format(string, sizeof(string), "%s\n%d. %s\t{%h} %s\t%s\tTemporarily disabled", string, number, Points[i][Name],Points[i][Owner],Points[i][CapperName]);
}
else
{
format(string, sizeof(string), "%s\n%d. %s\t%s\t%s\t%d", string, number, Points[i][Name],Points[i][Owner],Points[i][CapperName],Points[i][Vulnerable]);
}
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS, "Turfs", string, "Close", "");
}
}
return 1;
}
Here's dialog styles wiki: https://sampwiki.blast.hk/wiki/Dialog_Styles // it has examples provided!
Read them both so you can understand it better and next time, try to search before posting.
The code you provided is done by me (not this but the real /turfs code.), and i don't recommend you to use that leaked script.