Separate vip and admin - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Separate vip and admin (
/showthread.php?tid=408136)
REMOVE -
Fernado Samuel - 16.01.2013
Removed, thanks for the help!
Respuesta: Separate vip and admin -
Fabio11 - 17.01.2013
Wow it's hard to understand what you mean. So level 1-3 is VIP and level 4 or more is admin? Try this...
pawn Код:
if(pInfo[playerid][level] > 3)
{
format(string, sizeof(string), "Admin level: %d VIP level: 3",pInfo[playerid][level]); // Since max vip level is 3...
SendClientMessage(playerid, -1, string);
}
else
{
format(string, sizeof(string), "VIP level: %d",pInfo[playerid][level]);
SendClientMessage(playerid, -1, string);
}
Re: Respuesta: Separate vip and admin -
Threshold - 17.01.2013
Quote:
Originally Posted by Fabio11
Wow it's hard to understand what you mean. So level 1-3 is VIP and level 4 or more is admin? Try this...
pawn Код:
if(pInfo[playerid][level] > 3) { format(string, sizeof(string), "Admin level: %d VIP level: 3",pInfo[playerid][level]); // Since max vip level is 3... SendClientMessage(playerid, -1, string); } else { format(string, sizeof(string), "VIP level: %d",pInfo[playerid][level]); SendClientMessage(playerid, -1, string); }
|
Close, but I'm not sure if he wants it to say VIP Level if they're an admin. He hasn't created a pInfo[playerid][VIP] variable, and if he doesn't want to create one, that's fine, so I think if it's level 1-3, it's a VIP, any levels above is an admin.
pawn Код:
if(pInfo[playerid][level] > 3)
{
format(string, sizeof(string), "Admin Level: %d", pInfo[playerid][level]);
}
else if(pInfo[playerid][level] < 4 && pInfo[playerid][level] > 0) //We don't want a VIP level to show for Level 0 (I'm presuming :S)
{
format(string, sizeof(string), "VIP Level: %d", pInfo[playerid][level]);
}
SendClientMessage(playerid, -1, string);
Yeah you were basically right anyway Fabio.