public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart){new string[128], attacker[MAX_PLAYER_NAME];new weaponname[24];GetPlayerName(playerid, attacker, sizeof (attacker));GetWeaponName(weaponid, weaponname, sizeof (weaponname));format(string, sizeof(string), \"%s has made %.0f damage to actor id %d, weapon: %s\", attacker, amount, damaged_actorid, weaponname);SendClientMessageToAll(0xFFFFFFFF, string);if(!IsActorInvulnerable(damaged_actorid)) //Check if actor is vulnerable{ new Float:health; GetActorHealth(damaged_actorid, health); //Get current health SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health}return 1;}
CMD:actor(playerid,params[]){new Float:pos[3];GetPlayerPos(playerid, pos[0], pos[1], pos[2]);actor = CreateActor(15, pos[0] + 1, pos[1] + 1, pos[2], 0.0);SetActorVirtualWorld(actor, 0);SetActorInvulnerable(actor, 0);SetActorHealth(actor, 100.0);GivePlayerWeapon(playerid, WEAPON_M4, 500);return 1;}
new actor;
Nekem tökéletesen lefut ugyanez egy üres és egy nem üres móddal is, filterszkript formájában, biztos nincs semmi más?
//inlcude#include <a_samp>#include <zcmd>#include <sscanf>#include <streamer>//define színkódok#define feher 0xFFFFFFAA//amiket amiket küldtem és ennyi...
#include <a_samp>#include <zcmd>#include <fixchars>main(){}public OnGameModeInit(){ DisableInteriorEnterExits();AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);return 1;}public OnGameModeExit(){return 1;}public OnPlayerRequestClass(playerid, classid){SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);return 1;}public OnPlayerConnect(playerid){return 1;}public OnPlayerDisconnect(playerid, reason){return 1;}public OnPlayerSpawn(playerid){return 1;}public OnPlayerDeath(playerid, killerid, reason){return 1;}public OnVehicleSpawn(vehicleid){return 1;}public OnVehicleDeath(vehicleid, killerid){return 1;}public OnPlayerText(playerid, text[])