OnPlayerText
#1

Здравствуйте,хотел бы узнать правильно ли написал код? можете подправить если требуется?

плюс в конце return true; выдает варнинг

PHP код:
public OnPlayerText(playeridtext[])
{             
    if(
PlayerLogin[playerid] == false) return true;
    {
                new 
string[128];
        if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && !PlayerCuffed{playerid})
        {
            if(
IsAGang(playerid))
            {
                switch(
random(7))
                {
                    case 
0ApplyAnimation(playerid,"GHANDS","gsign2",4.0,0,1,1,1,1,1);
                    case 
1ApplyAnimation(playerid,"GHANDS","gsign4LH",4.0,0,1,1,1,1,1);
                    case 
2ApplyAnimation(playerid,"GHANDS","gsign3LH",4.0,0,1,1,1,1,1);
                    case 
3ApplyAnimation(playerid,"GHANDS","gsign4",4.0,0,1,1,1,1,1);
                    case 
4ApplyAnimation(playerid,"GHANDS","gsign2LH",4.0,0,1,1,1,1,1);
                    case 
5ApplyAnimation(playerid,"GHANDS","gsign5",4.0,0,1,1,1,1,1);
                    case 
6ApplyAnimation(playerid,"GHANDS","gsign5LH",4.0,0,1,1,1,1,1);
                }
            }
            else 
ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,1,1,1,1,1);
            
SetTimerEx("ClearAnim",2000,false,"i",playerid);
        }
        foreach(new 
iPlayer)
        {
            new 
Float:rdist,c;
            
rdist GetPlayerDistanceToPlayer(playerid,i);
            if (
rdist 14.0 || GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(i)) continue;
            switch(
floatround(rdist))
            {
                case 
0..40xFFFFFFFF;
                case 
5..80xCCCCCCFF;
                case 
9..140xAAAAAAFF;
                default: 
0x888888FF;
            }
            if(
FormaFrac[playerid] == 0)
            {
                
format(string,sizeof(string),"- %s (%s)[%d]",text,PlayerInfo[playerid][pNamePlayer],playerid);
            }
            else
            {
                
format(string,sizeof(string),"- %s {%s}(%s)[%d]",text,GetFractionColor[PlayerInfo[playerid][pMember]],PlayerInfo[playerid][pNamePlayer],playerid);
            }
            
SendClientMessage(i,c,string);
        }
        
SetPlayerChatBubble(playeridtextCOLOR_WHITE20.010000);
        return 
false;
    }
    return 
true;

Reply


Messages In This Thread
OnPlayerText - by FaGo - 03.08.2016, 13:57
Re: OnPlayerText - by Diman777 - 03.08.2016, 15:12
Re: OnPlayerText - by Romz - 03.08.2016, 15:25
Re: OnPlayerText - by FaGo - 03.08.2016, 17:44
Re: OnPlayerText - by Mutha_X - 03.08.2016, 18:40
Re: OnPlayerText - by FaGo - 03.08.2016, 22:23
Re: OnPlayerText - by OKStyle - 17.08.2016, 07:15
Re: OnPlayerText - by ZiGGi - 17.08.2016, 13:33
Re: OnPlayerText - by OKStyle - 17.08.2016, 17:14
Re: OnPlayerText - by Mutha_X - 17.08.2016, 17:36
Re: OnPlayerText - by OKStyle - 17.08.2016, 17:45
Re: OnPlayerText - by Mutha_X - 17.08.2016, 17:56
Re: OnPlayerText - by ZiGGi - 17.08.2016, 19:41

Forum Jump:


Users browsing this thread: 2 Guest(s)