Ayuda a Crear un comando Simple
#1

Hola amigos Como Creo Un Comando Simple
Que 2 Jugadores Del mismo Equipo No Se Puedan Matar Actualmente tengo que si se matan Mata al jugador que mato al otro automaticamente
Reply
#2

Me parece que eso no es un comando jaja, pero puedes usar esta funciуn.
Reply
#3

https://sampwiki.blast.hk/wiki/SetPlayerTeam
Reply
#4

Eso no es un comando...

Puedes utilizar esto.

Код:
#define TEAM_1 1

public OnPlayerUpdate(playerid)
{
new equipo = GetPlayerTeam(playerid);

if(equipo == TEAM_1)
{
...
}

else if
{
...
}

}
https://sampwiki.blast.hk/wiki/SetPlayerTeam
https://sampwiki.blast.hk/wiki/GetPlayerTeam

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    new string[128], victim[MAX_PLAYER_NAME], attacker[MAX_PLAYER_NAME];
    new weaponname[24];
    GetPlayerName(playerid, attacker, sizeof (attacker));
    GetPlayerName(damagedid, victim, sizeof (victim));
 
    GetWeaponName(weaponid, weaponname, sizeof (weaponname));
    format(string, sizeof(string), "%s", amount);
    SetPlayerHealth(playerid, string);
    return 1;
}
Te quiero recordar que ese codigo ni te funcionara.. Es solo para que te des una idea de como hacerlo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)