їerror de comando?
#4

їPor quй retorna a 0? No sй, pero lo puse debajo de /slap, y el copilador me tira error, por un super error supongo, asн lo coloquй:

pawn Код:
if(strcmp(cmd, "/slap", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(JugadorInfo[playerid][jAdmin] >=1)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, GRIS, "Uso: /slap [ID/Nombre]");
                    return 1;
                }
                new playa;
                new Float:shealth;
                new Float:slx, Float:sly, Float:slz;
                playa = ReturnUser(tmp);
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        GetPlayerHealth(playa, shealth);
                        JugadorInfo[playerid][jVida] = shealth-5;
                        SetPlayerHealth(playa, shealth-5);
                        GetPlayerPos(playa, slx, sly, slz);
                        SetPlayerPos(playa, slx, sly, slz+5);
                        PlayerPlaySound(playa, 1130, slx, sly, slz+5);
                        printf("Administraciуn: %s golpeу a %s",sendername,  giveplayer);
                        format(string, sizeof(string), "Administraciуn: %s fue golpeado por %s",giveplayer ,sendername);
                        ABroadCast(ROJO,string,1);
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, ROJO_OSCURO, " No puedes usar este comando!");
                return 1;
            }
        }
        return 1;
    }

    if(strcmp(cmd, "/tpc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tmp1[128],tmp2[128],tmp3[128];
            tmp1 = strtok(cmdtext, idx);
            tmp2 = strtok(cmdtext, idx);
            tmp3 = strtok(cmdtext, idx);
            if(!strlen(tmp1) && !strlen(tmp2) && !strlen(tmp3)) return SendClientMessage(playerid, -1, "Usa: /tpc <X> <Y> <Z>");

            SetPlayerPos(playerid, strval(tmp1), strval(tmp2), strval(tmp3));
            SendClientMessage(playerid, -1, "Teletransportado.");
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
їerror de comando? - by Glimma - 25.08.2012, 20:50
Respuesta: їerror de comando? - by Fluid016 - 25.08.2012, 21:34
Respuesta: їerror de comando? - by OTACON - 25.08.2012, 21:36
Re: їerror de comando? - by Glimma - 25.08.2012, 21:54
Re: їerror de comando? - by Daniel-92 - 25.08.2012, 23:19
Re: їerror de comando? - by Glimma - 26.08.2012, 00:30
Respuesta: їerror de comando? - by Jose_grana - 26.08.2012, 00:56
Respuesta: Re: їerror de comando? - by Daniel-92 - 26.08.2012, 01:30
Respuesta: Re: їerror de comando? - by OTACON - 26.08.2012, 18:52

Forum Jump:


Users browsing this thread: 2 Guest(s)