10.01.2016, 19:50
Hey guys,
Im having some issues with aod, when a person is going AOD, his color should be changed, to ff387a (pinkish)
However i have no clue on why it is not working, i've been trying and trying all day now and i just can't seem to find out what i have been doing wrong, i added 0x infront of the hex code but no luck..
also the 3D text label is staying when i am aod and toggle it off.
Im having some issues with aod, when a person is going AOD, his color should be changed, to ff387a (pinkish)
However i have no clue on why it is not working, i've been trying and trying all day now and i just can't seem to find out what i have been doing wrong, i added 0x infront of the hex code but no luck..
also the 3D text label is staying when i am aod and toggle it off.
Код:
CMD:aod(playerid) //Doesnt need params function { if(pData[playerid][Admin] >=1) { if (aod[playerid] == 0) //Check if player is on duty { new Float:x,Float:y,Float:z; new Text3D:label = Create3DTextLabel("{ff387a}Admin On Duty!", 0xff387a,x,y,z, 40.0, 0, 0); //Creates 3d text label at player position GetPlayerPos(playerid,x,y,z); //Looks for players position SetPlayerHealth(playerid,999999); //makes player godmode SetPlayerColor(playerid,0xff387aa); //set admin colour red SendClientMessage(playerid,COLOR_WHITE,"You are now on duty!"); //Tell admin he is now on duty Attach3DTextLabelToPlayer(label,playerid,0.0, 0.0, 0.7); //attach 3d text label made before to player aod[playerid] = 1; //Set player on duty } else if (aod[playerid] == 1) //Check if player is on duty { new Float:x,Float:y,Float:z; new Text3D:label = Create3DTextLabel("Admin On Duty!", 0xff387a,x,y,z, 40.0, 0, 0); Delete3DTextLabel(label); //Delete 3d text label saying "Admin On Duty!" SetPlayerHealth(playerid,100); //sets player health back to 100 SetPlayerToTeamColour(playerid); SendClientMessage(playerid, COLOR_WHITE,"{ff387a}[Admin]:{ffffff} You are now off duty!"); //send admin message he is off duty aod[playerid] = 0; //sets admin off duty } } else SendClientMessage(playerid,COLOR_WHITE,"{ff0000}[Error]:{ffffff} You are not authorized to use this command."); //Error message to send to players who arent admins return 1; }