Guys I need help with my vips
#2

pawn Код:
switch(PlayerInfo[i][OnDuty])
{
    case 0: VipDuty = "Playing!";
    case 1: VipDuty = "OnDuty!";
}
format(string,sizeof(string),"Level: %d - %s(ID:%d) | %s | %s\n", PlayerInfo[i][dRank], PlayerName2(i), i, GetRankFromAdmin(i), VipDuty);
Also you can change VipDuty[1000] to VipDuty[60]
pawn Код:
switch(PlayerInfo[i][OnDuty])
{
    case 0: format(VipDuty, sizeof(VipDuty), "Level: %d - %s(ID:%d) | %s | Playing\n", PlayerInfo[i][dRank], PlayerName2(i), i, GetRankFromAdmin(i));
    case 1: format(VipDuty, sizeof(VipDuty), "Level: %d - %s(ID:%d) | %s | OnDuty\n", PlayerInfo[i][dRank], PlayerName2(i), i, GetRankFromAdmin(i));
}
strcat(string, VipDuty);
Your using format with string, but as another admin is found it re-formats the string and then erases what you had before. What I have done is used strcat to attach the new string your formatting with VipDuty and adding it to string.

More info on strcat: https://sampwiki.blast.hk/wiki/Strcat
Reply


Messages In This Thread
Guys I need help with my vips - by donhu789 - 18.11.2013, 03:32
Re: Guys I need help with my vips - by DeStunter - 18.11.2013, 03:42
Re: Guys I need help with my vips - by SuperViper - 18.11.2013, 04:36
Re: Guys I need help with my vips - by donhu789 - 18.11.2013, 09:40

Forum Jump:


Users browsing this thread: 2 Guest(s)