2 dudas
#2

pawn Код:
new es_zombie[MAX_PLAYERS]:
//___________________comando o donde veas conveniente
es_zombie[playerid] = 1;
//____________________________________________________

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_JUMP)
    {
        if(gTeam[playerid] == TEAM_MUTANTES) return SendClientMessage(playerid,COLOR_ROJO,"Solo saltan alto los mutantes");
        new Float:SuperJump[3];
        GetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]);
        SetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]+5);
        return 1;
    }
    if(newkeys & KEY_HANDBRAKE)
    {
        if(es_zombie[playerid])//si tiene 1 se aplica.
        {
            if(GetPlayerWeapon(playerid) == 9 || GetPlayerWeapon(playerid) == 0)
            {
                new victimid = GetClosestPlayer(playerid);
                if(IsPlayerConnected(victimid))
                {
                    if(GetDistanceBetweenPlayers(playerid,victimid) < 2)
                    {
                        new Float:health;
                        GetPlayerHealth(victimid, health);
                        SetPlayerHealth(victimid, health - 10.0);
                        SetPlayerScore(playerid,(GetPlayerScore(playerid))+1);
                        GameTextForPlayer(victimid, "~r~Te muerden -10 hp", 1000, 5);
                        GameTextForPlayer(playerid, "~r~ +1 score mordida ", 1000, 5);
                        ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.0, 0, 0, 0, 0, 0);
                        PlayerPlaySound(victimid,1190,0,0,0);
                        return 1;
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
2 dudas - by Smoke123 - 20.01.2015, 19:52
Respuesta: 2 dudas - by jotajeda - 20.01.2015, 20:19
Respuesta: 2 dudas - by Smoke123 - 20.01.2015, 23:10
Respuesta: 2 dudas - by !R1Ch@rD! - 21.01.2015, 16:14
Respuesta: 2 dudas - by xTexTx - 21.01.2015, 16:35
Respuesta: 2 dudas - by Smoke123 - 21.01.2015, 17:03
Respuesta: 2 dudas - by !R1Ch@rD! - 22.01.2015, 01:30

Forum Jump:


Users browsing this thread: 3 Guest(s)