05.01.2013, 00:32
Hi, I use a script to VIP levels 1,2,3 and I want to make a stock that after writing / vips display text instead of 1,2,3 Bronze, Silver, Gold
Stock is as follows:
A command:
However, when you display the dialog again displays 1,2,3. Do not know how?
Stock is as follows:
Код:
stock GetValTarif(val) { new name[16]; if(val == 1) name = "Bronze"; else if(val == 2) name = "Silver"; else if(val == 3) name = "Gold"; else name = "None"; return name; }
Код:
COMMAND: vips (playerid, params []) { new string [1024], temp [128]; strcat (string, "" blue "VIP Players On-Line: \ n" white ""); for (new i = 0 i <MAX_PLAYERS, i + +) { if (PlayerInfo [i] [VIPLevel]> = 1 && IsPlayerConnected (i)) { format (temp, sizeof (temp), "\ n% s [% d] Tarif:% d", GetName (i), i, GetValTarif (PlayerInfo [i] [VIPLevel])); strcat (string, temp); } } ShowPlayerDialog (playerid, VIPS_DIALOG, DIALOG_STYLE_MSGBOX, "VIP Players", string, "Ok", ""); return 1; }