[FilterScript] Update Label "Admin"
#1



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;

Reply
#2

Nice work is this your first fs?
Reply
#3

Nice work, as above is it the first ?
Reply
#4

cool dude
Reply
#5

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

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
Reply
#7

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...
Reply
#8

Hey, Nice

Suggestion:

You can use OnRconLoginAttempt.
Reply
#9

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

Is one work perfect!!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)