jeudi 21 juillet 2016

Code not working.

I have made a dialog, where a player can type the ID or name of a player, to see their stats, but its not working.

PHP Code:

        case DIALOG_SEE:
        {
            if(!
response) return SendClientMessage(playeridCOLOR_GREY"You have cancelled.");
            else
            {
                new 
CheckID;
                if(
sscanf(inputtext"u"CheckID))
                {
                    if(
IsPlayerConnected(CheckID) || CheckID != INVALID_PLAYER_ID)
                    {
                        
ShowStats(playeridCheckID);
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"The player is not connected/player id is invalid");
                    }
                }
            }
            return 
1;
        } 

This code is not working properly, it applies the animation for 2-3 seconds and stops the anim, while i have typed some long shit in my chat...

PHP Code:

    new wordslength strlen(text);
    for(new 
0lengthi++)
    {
        if(
!= ' ') continue;
        else 
words += 1;
    }
       
words += 1;
    
ApplyAnimation(playerid"PED""IDLE_CHAT"10000words*15001); 

Let's block ads! (Why?)



Code not working.

Aucun commentaire:

Enregistrer un commentaire