/admins help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /admins help (
/showthread.php?tid=65836)
/admins help -
lavamike - 16.02.2009
Okay, i'm trying to make /admins and i've gotten like the basics of it down but i'm trying to make it so if there is more than 1 admin online it continues and everything like for example say there are 2 admins online it would show:
Present Admins: Admin1(ID)-L, Admin2(ID)-L
in stead of:
Present Admins: Admin1(ID)-L
Present Admins: Admin2(ID)-L
and if the list gets too big it would make a new line and continue for example:
Present Admins: Admin1(ID)-L, Admin2(ID)-L, Admin3(ID)-L, Admin4(ID)-L, Admin5(ID)-L
Present Admins: Admin6(ID)-L, Admin7(ID)-L
Here is what I currently have...
pawn Код:
dcmd_admins(playerid, params[])
{
if(strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Use /admins");
new count = 0;
new string[128];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
new player[24];
GetPlayerName(i, player, 24);
if(dUserINT(player).("AdminLevel") >= 1 && dUserINT(player).("AdminLevel") <= 6)
{
format(string, sizeof(string), "Present Admins: %s(%i)-%i",player,i,dUserINT(player).("AdminLevel"));
SendClientMessage(playerid, COLOR_CYAN, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_CYAN, "No admins present");
}
return 1;
}
If anybody could help me out on this it would be greatly appreciated, I know it can be done I just don't know how.
P.S: I've searched and I must have looked at a dozen different admin scripts and couldn't figure it out.
Re: /admins help -
andy4ever - 16.02.2009
I guess I know what your talking about, because I know you from Argonath. You want it to look like Argonath, am I right? I guess I have this, I will look for it and post it right away when I find it
Re: /admins help -
lavamike - 16.02.2009
Quote:
Originally Posted by Andyfer
I guess I know what your talking about, because I know you from Argonath. You want it to look like Argonath, am I right? I guess I have this, I will look for it and post it right away when I find it
|
I mean that I need help on the adding on to one line kinda thing in general
Re: /admins help -
andy4ever - 16.02.2009
Ok now I get you, I think I have this. I will test it and see if it works, if it does, I will post it here
Re: /admins help -
lavamike - 16.02.2009
Quote:
Originally Posted by Andyfer
Ok now I get you, I think I have this. I will test it and see if it works, if it does, I will post it here
|
Ah, sorry I figured it out myself
But if you still want to post it here you can maybe it will help someone else one day