17.11.2015, 12:47
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart){ if(IsPlayerNPC(issuerid)) return 1; if(IsPlayerInAnyVehicle(issuerid)){ if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER){ format(string, sizeof(string), "[INFO]: %s foi removido de seu veнculo por cometer Drive By", GetNick(issuerid)); SendClientMessageToAll(Amarelo, string); RemovePlayerFromVehicle(issuerid); return true; } } static _dmg_str[60] ; format(_dmg_str, 60, "Hit: %d", floatround(amount)); TextDrawSetString(DueloHit[issuerid][0], _dmg_str); TextDrawShowForPlayer(issuerid, DueloHit[issuerid][0]); format(_dmg_str, 60, "Dano: %d", floatround(amount)); TextDrawSetString(DueloHit[playerid][1], _dmg_str); TextDrawShowForPlayer(playerid, DueloHit[playerid][1]); SetTimerEx("RemoveDraw", 2000, false, "ii", issuerid, _:DueloHit[issuerid][0]); SetTimerEx("RemoveDraw", 2000, false, "ii", playerid, _:DueloHit[playerid][1]); return true; }