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] = {
0xFF0000FF, 0xFF2C00FF, 0xFF5000FF, 0xFF8700FF, 0xFFA700FF,
0xFFDC00FF, 0xFFFB00FF, 0xC4FF00FF, 0x7BFF00FF, 0x00FF00FF,
0x00FF1EFF, 0x00FF3BFF, 0x00FF7CFF, 0x00FFAEFF, 0x00FFD5FF,
0x00FFFFFF, 0x00CCFFFF, 0x00ACFFFF, 0x0083FFFF, 0x0054FFFF,
0x0000FFFF, 0x2C00FFFF, 0x5F00FFFF, 0x9B00FFFF, 0xCB00FFFF
};
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], playerid, 0.0, 0.0, 0.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(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/adminlabel",true))
{
if (!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0x33CCFFAA, "* You are not admin!");
return 1;
}
if(Hentum[playerid] == 0)
{
Hentum[playerid] = 1;
ColorUpdate(playerid);
SendClientMessage(playerid, 0x33CCFFAA, "* You on label!");
}
else
{
KillTimer(count[playerid]);
Update3DTextLabelText(Label[playerid], Colors[number[playerid]], "");
Hentum[playerid] = 0;
SendClientMessage(playerid, 0x33CCFFAA, "* 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!!