VIP GetPlayerName help
#1

Hello , i have luxadmin system and i update it and add new cmds but when i type /vips its just shaw Id of vip and level and i want it to show his Name and Level Example:

Quote:

GetPlayerName...
VIPs: %s[Level %d] , pName , Rank

This is cmd in luxadmin

Quote:

dcmd_vips(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][LoggedIn] == 1)
{
if(AccInfo[playerid][Level] >= 0)
{
new bool:First2 = false;
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;

if(Count == 0)
return SendClientMessage(playerid,yellow, "No VIPs online, try to donate your self.");

for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Free";
case 2: AccType = "Casher";
case 3: AccType = "Gold Casher";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "VIPs: %d(%s)", i,AccType);
First2 = true;
}
else format(string,sizeof(string),"%s, %d(%s)",string,i,AccType);
}
return SendClientMessage(playerid,yellow,string);
}
else return ErrorMessages(playerid, 1);
}
else return SendClientMessage(playerid,yellow,"No VIPs online, try to donate your self.");
}
Thanks !
Reply
#2

Well, maybe
PHP Code:
format(stringsizeof(string), "VIPs: %s [Level: %s]"adminnameAccType); 
Reply
#3

Not working :S
Reply
#4

pawn Code:
format(string, sizeof(string), "VIPs: %s [Level: %s]", GetName(i), AccType);
pawn Code:
stock GetName(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, 24);
    return name;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)