02.10.2016, 19:16
(
Последний раз редактировалось ViDaLoKa1; 02.10.2016 в 20:12.
Причина: Adicionado mensagem para todos.
)
Fiz esse bem rбpido aqui use como base acho que й oque procura:
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER){ if(weaponid == WEAPON_VEHICLE) { static dbname[MAX_PLAYER_NAME], vname[MAX_PLAYER_NAME]; static Float:X, Float:Y, Float:Z, Float:Health, Float:Armour; static str[128]; GetPlayerName(issuerid, dbname, MAX_PLAYER_NAME); GetPlayerName(playerid, vname, MAX_PLAYER_NAME); GetPlayerPos(issuerid, X, Y, Z); GetPlayerPos(playerid, X, Y, Z); SetPlayerPos(playerid, X, Y, Z+4); //Tira o player debaixo do carro SetPlayerPos(issuerid, X, Y, Z+5); //Ejeta o motorista GetPlayerHealth(issuerid, Health); GetPlayerArmour(issuerid, Armour); SetPlayerHealth(issuerid, Health - 30); //Tira -30 de HP do motorista SetPlayerArmour(issuerid, Armour - 30); //Tira -30 de Colete do motorista format(str, sizeof(str), "INFO: %s fez DB em %s | Foi ejetado do seu veнculo e perdeu Vida e Colete |", dbname,vname); SendClientMessageToAll(0xFFFF00FF, str); } } return 1; }