Help me here plz :)
#1

Hi, i have /aduty command, only admins can use it and in my code something don't work is the color of admin
when admin type /aduty it doesn't set his color to pink as in my code, please help please i give +rep to who help me
pawn Код:
dcmd_aduty(playerid,params[])
{
#pragma unused params
if(AdminLevel[playerid] < 1) return SCM(playerid,COLOR_WHITE,"[ERROR] {FFFFFF}Yo! You're not admin.");
if(IsAod[playerid] == 0)
{
IsAod[playerid] = 1;
SetPlayerHealth(playerid, 999999999);
TextDrawShowForPlayer(playerid,aduty[playerid]);
SetPlayerColor(playerid,COLOR_PINK); //This doesn't work
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now on duty.");
Attach3DTextLabelToPlayer(aDutyLabel[playerid],playerid,0.0, 0.0, 0.7);
}
else
{
IsAod[playerid] = 0;
SetPlayerHealth(playerid, 100);
TextDrawHideForPlayer(playerid,aduty[playerid]);
Delete3DTextLabel(aDutyLabel[playerid]);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now off duty.");
}
return 1;
}
Help plz
Reply
#2

BUMP
Plz help plz
Reply
#3

Код:
dcmd_aduty(playerid,params[])
{
#pragma unused params
if(AdminLevel[playerid] < 1) return SCM(playerid,COLOR_WHITE,"[ERROR] {FFFFFF}Yo! You're not admin.");
if(IsAod[playerid] == 0)
{
IsAod[playerid] = 1;
SetPlayerHealth(playerid, 999999999);
TextDrawShowForPlayer(playerid,aduty[playerid]);
SetPlayerColor(playerid,0xFFC0CBAA);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now on duty.");
Attach3DTextLabelToPlayer(aDutyLabel[playerid],playerid,0.0, 0.0, 0.7);
}
else
{
IsAod[playerid] = 0;
SetPlayerHealth(playerid, 100);
TextDrawHideForPlayer(playerid,aduty[playerid]);
Delete3DTextLabel(aDutyLabel[playerid]);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now off duty.");
}
return 1;
}
Reply
#4

Код:
dcmd_aduty(playerid,params[])
{
#pragma unused params
if(AdminLevel[playerid] < 1) return SCM(playerid,COLOR_WHITE,"[ERROR] {FFFFFF}Yo! You're not admin.");
if(IsAod[playerid] == 0)
{
IsAod[playerid] = 1;
SetPlayerHealth(playerid, 999999999);
TextDrawShowForPlayer(playerid,aduty[playerid]);
SetPlayerColor(playerid, 0xFF00FFFF);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now on duty.");
Attach3DTextLabelToPlayer(aDutyLabel[playerid],playerid,0.0, 0.0, 0.7);
}
else
{
IsAod[playerid] = 0;
SetPlayerHealth(playerid, 100);
TextDrawHideForPlayer(playerid,aduty[playerid]);
Delete3DTextLabel(aDutyLabel[playerid]);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now off duty.");
}
return 1;
Reply
#5

Quote:
Originally Posted by Inn0cent
Посмотреть сообщение
Код:
dcmd_aduty(playerid,params[])
{
#pragma unused params
if(AdminLevel[playerid] < 1) return SCM(playerid,COLOR_WHITE,"[ERROR] {FFFFFF}Yo! You're not admin.");
if(IsAod[playerid] == 0)
{
IsAod[playerid] = 1;
SetPlayerHealth(playerid, 999999999);
TextDrawShowForPlayer(playerid,aduty[playerid]);
SetPlayerColor(playerid, 0xFF00FFFF);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now on duty.");
Attach3DTextLabelToPlayer(aDutyLabel[playerid],playerid,0.0, 0.0, 0.7);
}
else
{
IsAod[playerid] = 0;
SetPlayerHealth(playerid, 100);
TextDrawHideForPlayer(playerid,aduty[playerid]);
Delete3DTextLabel(aDutyLabel[playerid]);
SCM(playerid,COLOR_WHITE,"[ADMIN] {FFFFFF}You are now off duty.");
}
return 1;
lol you just copied BlackBomb's post :/
Reply
#6

You know,I am making post before BlackBomb but i goto other web site,i forgot i am making post there,so i come back and posted.
Reply
#7

Why is it the exact format as his :/?
Reply
#8

thx for all help guys, i had mistake in OnPlayerConnect public i fix it now i'm fine ty Inn0cent and BlackBomb
+REP both
Reply
#9

Quote:
Originally Posted by Tomix
Посмотреть сообщение
Why is it the exact format as his :/?
It's same princip everyone would answer it like that,why do you keep argue wuthout reason...
Reply
#10

Because i Copied "FakkChass" command and just changed SetPlayerColor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)