SA-MP Forums Archive
Help me here plz :) - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me here plz :) (/showthread.php?tid=476503)



Help me here plz :) - FakkChass - 18.11.2013

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


Re: Help me here plz :) - FakkChass - 18.11.2013

BUMP
Plz help plz


Re: Help me here plz :) - ReD_HunTeR - 18.11.2013

Код:
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;
}



Re: Help me here plz :) - Inn0cent - 18.11.2013

Код:
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;



Re: Help me here plz :) - Tomix - 18.11.2013

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 :/


Re: Help me here plz :) - Inn0cent - 18.11.2013

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.


Re: Help me here plz :) - Tomix - 18.11.2013

Why is it the exact format as his :/?


Re: Help me here plz :) - FakkChass - 18.11.2013

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


Re: Help me here plz :) - ***Niko*** - 18.11.2013

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...


Re: Help me here plz :) - Inn0cent - 18.11.2013

Because i Copied "FakkChass" command and just changed SetPlayerColor