SA-MP Forums Archive
[FilterScript] Update Label "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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Update Label "Admin" (/showthread.php?tid=239326)



Update Label "Admin" - Igorek - 13.03.2011



Commands:
/adminlabel -on/off label

PHP код:
/*
 ====================================
|[FS]Label Admin  by [OmegaKai]Games |
|Colors by OKStyle                   |
 ====================================
*/
#include <a_samp>
forward ColorUpdate(playerid);
new 
Colors[25] = {
0xFF0000FF0xFF2C00FF0xFF5000FF0xFF8700FF0xFFA700FF,
0xFFDC00FF0xFFFB00FF0xC4FF00FF0x7BFF00FF0x00FF00FF,
0x00FF1EFF0x00FF3BFF0x00FF7CFF0x00FFAEFF0x00FFD5FF,
0x00FFFFFF0x00CCFFFF0x00ACFFFF0x0083FFFF0x0054FFFF,
0x0000FFFF0x2C00FFFF0x5F00FFFF0x9B00FFFF0xCB00FFFF
};
new 
Text3D:Label[MAX_PLAYERS];
new 
Hentum[MAX_PLAYERS];
new 
number[MAX_PLAYERS];
new 
count[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
    
number[playerid] = 0;
    
Hentum[playerid] = 0;
    
Label[playerid] = Create3DTextLabel("",0,30.0,40.0,50.0,70.0,0,1);
    
Attach3DTextLabelToPlayer(Label[playerid], playerid0.00.00.4);
    return 
1;
}
public 
ColorUpdate(playerid)
{
    
count[playerid] = SetTimerEx("ColorUpdate",200,0,"i",playerid);
    
Update3DTextLabelText(Label[playerid], Colors[number[playerid]], ".:Admin:.");
    
SetPlayerColor(playerid,Colors[number[playerid]]);
    
number[playerid]++;
    if(
number[playerid] == 25)
    {
        
number[playerid] = 1;
    }
    if(
Hentum[playerid] == 0)
    {
        
KillTimer(count[playerid]);
        
Update3DTextLabelText(Label[playerid], Colors[number[playerid]], "");
    }
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext,"/adminlabel",true))
    {
        if (!
IsPlayerAdmin(playerid))
        {
            
SendClientMessage(playerid0x33CCFFAA"* You are not admin!");
            return 
1;
        }
        if(
Hentum[playerid] == 0)
        {
            
Hentum[playerid] = 1;
            
ColorUpdate(playerid);
            
SendClientMessage(playerid0x33CCFFAA"* You on label!");
        }
        else
        {
            
KillTimer(count[playerid]);
            
Update3DTextLabelText(Label[playerid], Colors[number[playerid]], "");
            
Hentum[playerid] = 0;
            
SendClientMessage(playerid0x33CCFFAA"* You off label!");
        }
        return 
1;
    }
    return 
0;




Re: Update Label "Admin" - BASITJALIL - 13.03.2011

Nice work is this your first fs?


Re: Update Label "Admin" - Meinstad - 13.03.2011

Nice work, as above is it the first ?


Re: Update Label "Admin" - leingod - 13.03.2011

cool dude


Re: Update Label "Admin" - OKStyle - 13.03.2011

Quote:
Originally Posted by Igorek
Посмотреть сообщение
Colors by OKStyle
Yeah, from: https://sampforum.blast.hk/showthread.php?tid=237922


Re: Update Label "Admin" - Meinstad - 13.03.2011

Quote:
Originally Posted by OKStyle
Посмотреть сообщение
Yea he lost the credits, but he's new so let it pass these time xP

We should say Thanks to OKStyle and Igorek for the FS


Re: Update Label "Admin" - Igorek - 14.03.2011

Quote:
Originally Posted by BASITJALIL
Посмотреть сообщение
Nice work is this your first fs?
No,but published on this site is only 1 job.
Quote:
Originally Posted by Meinstad
Посмотреть сообщение
We should say Thanks to OKStyle and Igorek for the FS
Thanks...


Re: Update Label "Admin" - Sasino97 - 14.03.2011

Hey, Nice

Suggestion:

You can use OnRconLoginAttempt.


Re: Update Label "Admin" - HyperZ - 14.03.2011

Next time use Pawn Pastebin or pawn tags: [pawn] [/pawn ]
Nice work btw.


Respuesta: Update Label "Admin" - junkbuster - 14.03.2011

Is one work perfect!!