/admins -
nuriel8833 - 19.07.2009
i need the command /admins
and i need that all the 3 admins will be in 1 line like
Bla(ID:0|Lvl:6) ~ Bla2(ID:2|Lvl:2) ~ Bla3(ID:5|Lvl:
![Cool](images/smilies/cool.gif)
And after 3 admins it will creat a new line like:
Bla(ID:0|Lvl:6) ~ Bla2(ID:2|Lvl:2) ~ Bla3(ID:5|Lvl:
![Cool](images/smilies/cool.gif)
Bla4(ID:0|Lvl:100) ~ Bla5(ID:55|Lvl:1) ~ Bla6(ID:3|Lvl:1)
tanks for the helpers
Re: /admins -
James_Alex - 19.07.2009
i think it's impossible to make 3 admin in the same line !!
Re: /admins -
nuriel8833 - 20.07.2009
cant you use 9 variables instead of 3 variables?
Re: /admins -
Gamer_Z - 20.07.2009
it should be posiible lol... you just need how to format it.. maybe if u use the Split function.. :P I am not a pro but just i think this should work.
Re: /admins -
nuriel8833 - 20.07.2009
what is the code
![Huh?](images/smilies/confused.gif)
can someone tell me how to do that?
Re: /admins -
yezizhu - 20.07.2009
Код:
new a[4],[128];
for(new i;i<200;i++){
if(connected(i)&&admin(i)){
a[a[3]++] = i;
if(a[3] == 3){
a[3] = 0;format(b,128,"a:lv%d,id%d blablabla",plv(a[0]),a[0],bla...);
send
}
}
if(a[3] >0){
format,send
}
It's example, please DIY^^
Re: /admins -
nuriel8833 - 20.07.2009
tanks but i need also the admin name like this: %s not: bla
Re: /admins -
yezizhu - 20.07.2009
Quote:
Originally Posted by nuriel8833
tanks but i need also the admin name like this: %s not: bla
|
Search "PlayerName" in useful function
Re: /admins -
James_Alex - 20.07.2009
try
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(..... blabla bla);
Re: /admins -
nuriel8833 - 20.07.2009
Quote:
Originally Posted by James_Alex(Coder)
try
pawn Код:
new name[MAX_PLAYER_NAME]; GetPlayerName(..... blabla bla);
![Wink](images/smilies/wink.png)
|
I used variable i here is the code:
pawn Код:
new a[4],[128];
for(new i;i<200;i++){
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 11)
{
GetPlayerName(i, adminname, sizeof(adminname));
if(connected(i)&&admin(i)){
a[a[3]++] = i;
if(a[3] == 3){
a[3] = 0;format(b,128,"%s (ID:%d|Lvl:%d) ~ %s (ID:%d|Lvl:%d) ~ %s (ID:%d|Lvl:%d)",adminname,a[0],PlayerInfo[i][pAdmin](a[0]),,bla...);
send
}
}
if(a[3] >0){
format,send
}
but the i can use only for 1 player and i dont know how to use it for the 3 players
can someone help me?
Re: /admins -
yezizhu - 20.07.2009
Again, search "stock PlayerName" in
this topic
![Shocked](images/smilies/surprised.gif)
And my code is just an example, you need to modtify to yourself
Re: /admins -
MadeMan - 20.07.2009
Quote:
Originally Posted by yezizhu
Код:
new a[4],[128];
for(new i;i<200;i++){
if(connected(i)&&admin(i)){
a[a[3]++] = i;
if(a[3] == 3){
a[3] = 0;format(b,128,"a:lv%d,id%d blablabla",plv(a[0]),a[0],bla...);
send
}
}
if(a[3] >0){
format,send
}
It's example, please DIY^^
|
This may work but I guess yezizhu is too lazy to finish this example
![Wink](images/smilies/wink.png)
Doesn't help much if you give it like that.
Re: /admins -
yezizhu - 20.07.2009
Quote:
Originally Posted by MadeMan
Quote:
Originally Posted by yezizhu
Код:
new a[4],[128];
for(new i;i<200;i++){
if(connected(i)&&admin(i)){
a[a[3]++] = i;
if(a[3] == 3){
a[3] = 0;format(b,128,"a:lv%d,id%d blablabla",plv(a[0]),a[0],bla...);
send
}
}
if(a[3] >0){
format,send
}
It's example, please DIY^^
|
This may work but I guess yezizhu is too lazy to finish this example ![Wink](images/smilies/wink.png) Doesn't help much if you give it like that.
|
I'm lazy for teaching him to learn what DIY is, don't you know?
Re: /admins -
MadeMan - 20.07.2009
Quote:
Originally Posted by yezizhu
Quote:
Originally Posted by MadeMan
Quote:
Originally Posted by yezizhu
Код:
new a[4],[128];
for(new i;i<200;i++){
if(connected(i)&&admin(i)){
a[a[3]++] = i;
if(a[3] == 3){
a[3] = 0;format(b,128,"a:lv%d,id%d blablabla",plv(a[0]),a[0],bla...);
send
}
}
if(a[3] >0){
format,send
}
It's example, please DIY^^
|
This may work but I guess yezizhu is too lazy to finish this example ![Wink](images/smilies/wink.png) Doesn't help much if you give it like that.
|
I'm lazy for teaching him to learn what DIY is, don't you know?
|
Ofc, as you say
Re: /admins -
Calgon - 20.07.2009
Why don't you just let it show each admin on one line? Saves code.
Код:
if ( strcmp ( cmd, "/admins", true ) == 0 )
{
for ( new i = 0; i < MAX_PLAYERS; i++ )
{
if ( IsPlayerConnected ( i ) )
{
if ( AdminVarBlaBla >= 1 )
{
new plname[MAX_PLAYERS];
GetPlayerName( i, plname, sizeof( plname ) );
format ( string, sizeof ( string ), "Admin %s is online (Level %d), ID: %d.", plname, AdminVarBlaBla, i );
SendClientMessage ( playerid, 0xB4B5B7FF, string );
}
}
}
return 1;
}
Re: /admins -
[BFN]Stunter - 20.07.2009
Quote:
if ( strcmp ( cmd, "/admins", true ) == 0 )
{
for ( new i = 0; i < MAX_PLAYERS; i++ )
{
if ( IsPlayerConnected ( i ) )
{
if ( AdminVarBlaBla >= 1 )
{
new plname[MAX_PLAYERS];
GetPlayerName( i, plname, sizeof( plname ) );
format ( string, sizeof ( string ), "Admin %s is online (Level %d), ID: %d.", plname, AdminVarBlaBla, i );
SendClientMessage ( playerid, 0xB4B5B7FF, string );
}
}
}
return 1;
}
|
That you need ?
Re: /admins -
Correlli - 20.07.2009
That's just a simple /admins command.
Read the first post again:
Quote:
Originally Posted by nuriel8833
and i need that all the 3 admins will be in 1 line like
|