Ayuda con crear estos Comandos
#3

Mmm.. hay un post para pedidos! Aca te dejo el de curar
pawn Код:
if(strcmp("/curar", cmd, true) == 0) //el codigo lo posteo Michael@Belgium en otro post!
    {
        if (gTeam[playerid] == MEDIC)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                return SendClientMessage(playerid,COLOR_LIGHTBLUE,"USO: /curar [id]");
            }
            new id = strval(tmp);
            new pid = playerid;
            if(!IsPlayerConnected(id))
            {
                return SendClientMessage(playerid,COLOR_GREY,"ERROR: Ese player esta desconectado!");
            }
            new Float:X,Float:Y,Float:Z, string[128], name[MAX_PLAYER_NAME];
            GetPlayerName(id,name,128);
            GetPlayerPos(id,X,Y,Z);
            if(IsPlayerInRangeOfPoint(playerid,3,X,Y,Z))
            {
                format(string,128,"[INFO] El medico %s[%d] te curo!", name, pid);
                                SetPlayerHealth(id,100);
                SendClientMessage(id,COLOR_GREY,string);
                return 1;
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"No estas cerca de la persona!");
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"No sos medico!");
            return 1;
        }
    }
Reply


Messages In This Thread
Ayuda con crear estos Comandos - by LordAgus - 16.03.2011, 11:32
Respuesta: Ayuda con crear estos Comandos - by MaRcOsWeB - 16.03.2011, 13:24
Re: Ayuda con crear estos Comandos - by murdoxix - 16.03.2011, 13:31
Respuesta: Ayuda con crear estos Comandos - by TheChaoz - 16.03.2011, 14:00
Re: Ayuda con crear estos Comandos - by murdoxix - 16.03.2011, 14:13
Respuesta: Ayuda con crear estos Comandos - by leaNN! - 16.03.2011, 14:15
Re: Respuesta: Ayuda con crear estos Comandos - by LordAgus - 16.03.2011, 14:42
Respuesta: Ayuda con crear estos Comandos - by leaNN! - 16.03.2011, 14:51
Re: Respuesta: Ayuda con crear estos Comandos - by LordAgus - 16.03.2011, 14:58
Re: Ayuda con crear estos Comandos - by murdoxix - 16.03.2011, 15:01

Forum Jump:


Users browsing this thread: 2 Guest(s)