[AJUDA]Comando
#6

ta faltando um ' } '.


tenta:
pawn Код:
if(strcmp(cmd, "/tapa", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, 0xFFFFFFFF, "USE: /tapa [playerid/PartOfName]");
                return 1;
            }
            new playa;
            new Float:shealth;
            new Float:slx, Float:sly, Float:slz;
            playa = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >=1)
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        GetPlayerHealth(playa, shealth);
                        SetPlayerHealth(playa, shealth-5);
                        GetPlayerPos(playa, slx, sly, slz);
                        SetPlayerPos(playa, slx, sly, slz+5);
                        PlayerPlaySound(playa, 1130, slx, sly, slz+5);
                        printf("AdmCmd: %s meteu um tapao em %s",sendername,  giveplayer);
                        format(string, sizeof(string), "AdmCmd: %s levou um tapa de %s",giveplayer ,sendername);
                        SendClientMessageToAll(0xFF6347AA,string);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, 0xFFFFFFFF, "   Vocк nгo pode utilizar esse comando!");
            }
            else
             {
                 SendClientMessage(playerid,VERMELHO," este player nгo esta conectado.");
             }
        }
return 1;
}[/pawn]
Reply


Messages In This Thread
[AJUDA]Comando - by egonzks - 18.08.2010, 06:13
Re: [AJUDA]Comando - by LeLeTe - 18.08.2010, 12:14
Re: [AJUDA]Comando - by egonzks - 19.08.2010, 02:25
Re: [AJUDA]Comando - by Kasura - 19.08.2010, 07:20
Re: [AJUDA]Comando - by egonzks - 20.08.2010, 13:27
Re: [AJUDA]Comando - by zSuYaNw - 20.08.2010, 14:58

Forum Jump:


Users browsing this thread: 1 Guest(s)