Label
#1

PHP код:
COMMAND:label(playeridparams[])
{
    if (
playerData[playerid][playerLoggedIn])
    {
        if(
playerData[playerid][HasCustomLable] == false)
        {
            new 
value[25];
            if(
sscanf(params"s"value))
            {
                return 
SendClientMessage(playeridCOLOR_WHITE"{B7B7B7}[SERVER] {FFFF00}Usage: /lable TEXT [COST = 4000XP]");
            }
            else
            {
                if (
playerData[playerid][playerXP] >= 4000)
                {
                    if(
strlen(value) < 16)
                    {
                        
playerGiveXP(playerid, -4000);
                        
playerData[playerid][CustomLabel] = Create3DTextLabel(value0xFFDC2EFF30.040.050.060.0, -11);
                        
Attach3DTextLabelToPlayer(playerData[playerid][CustomLabel], playerid0.00.00.4);
                        
playerData[playerid][HasCustomLable] = true;
                        
SendClientMessage(playeridCOLOR_RED"Label succesfully updated!");
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_RED"Label length must be inferior to 16!");
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_RED"You dont have enough xp to do that!");
                }
            }
        }
        else if(
playerData[playerid][HasCustomLable] == true)
            {
                
Delete3DTextLabel(playerData[playerid][CustomLabel]);
                
SendClientMessage(playerid, -1"Lable has been removed!");
            }
    }        
    return 
1;

no errors on compilation, but gives no answer on /label (or /label something) and when with the one i posted above /label triggers as player already has custom lable and tends to remove it

PHP код:
[16:50:27Lable has been removed
Reply


Messages In This Thread
Label - by iLearner - 23.09.2016, 18:39
Re: Label - by Lynn - 23.09.2016, 19:16
Re: Label - by iLearner - 23.09.2016, 19:32
Re: Label - by iLearner - 23.09.2016, 19:43
Re: Label - by iLearner - 24.09.2016, 05:07
Re: Label - by Tass007 - 24.09.2016, 05:41
Re: Label - by gurmani11 - 24.09.2016, 05:52

Forum Jump:


Users browsing this thread: 1 Guest(s)