Skidanje hp i armora istovremeno

Započeo Sonicc, April 13, 2020, 21:54:39 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Citat: Sonicc poslato April 14, 2020, 16:09:19 POSLE PODNE
Hvala uspio sam i ostalo mi je jos ovo
C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\pawno\include\YSI\y_hooks/impl.inc(2337) : error 021: symbol already defined: "OnPlayerTakeDamage"
C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\pawno\include\YSI\y_hooks/impl.inc(2384) : error 021: symbol already defined: "OnPlayerGiveDamage"
C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\gamemodes\crown.pwn(28998) : warning 217: loose indentation

OnGameModeInit();
	[28998]SetVehiclePassengerDamage(true);
	SetDisableSyncBugs(true);


Odes u  C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\pawno\include\YSI\y_hooks/impl.inc
I dodas na vrhu ovako:
#if defined _ALS_OnPlayerTakeDamage
     #undef OnPlayerTakeDamage
#endif
#if defined _ALS_OnPlayerGiveDamage
     #undef OnPlayerGiveDamage
#endif


onda vjv koristi y_hooks jbg, nisam nikad koristio tako da ti tu ne mogu pomoc




Ima li netko da bi mogao pomoci oko ovoga?
C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\pawno\include\YSI\y_hooks/impl.inc(2337) : error 021: symbol already defined: "OnPlayerTakeDamage"
C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\pawno\include\YSI\y_hooks/impl.inc(2384) : error 021: symbol already defined: "OnPlayerGiveDamage"

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
[2337]{
	P:2("Hooks_OnPlayerTakeDamage called: %d, %d, %f, %d, %d", playerid, issuerid, Float:amount, weaponid, bodypart);
	new
		end   = _:YSI_g_sCallbackEnd[ALS_OnPlayerTakeDamage],
		start = _:YSI_g_sCallbackStart[ALS_OnPlayerTakeDamage],
		ret = ALS_R_PlayerTakeDamage;
	while (start++ != end)
	{
		#emit PUSH.S bodypart
		#emit PUSH.S weaponid
		#emit PUSH.S amount
		#emit PUSH.S issuerid
		#emit PUSH.S playerid
		#emit PUSH.C     16
		#emit CONST.alt  YSI_g_sCallbackAddresses
		#emit LOAD.S.pri start
		//#emit INC.pri
		//#emit STOR.S.pri start
		#emit LIDX
		#emit MOVE.alt
		#emit LCTRL      6
		#emit ADD.C      24
		#emit PUSH.pri
		#emit MOVE.pri
		#emit SCTRL      6
		#emit MOVE.alt
		#emit CONST.pri  0xFFFFFFFE
		#emit AND
		#emit PUSH.pri
		#emit LOAD.S.pri ret
		#emit AND
		#emit POP.alt
		#emit OR
		#emit STOR.S.pri ret
		if (ret < 0) return ret + 1;
	}
	return ret;
}
#if defined _ALS_OnPlayerTakeDamage
	#undef OnPlayerTakeDamage
#else
	#define _ALS_OnPlayerTakeDamage
#endif
#define OnPlayerTakeDamage S[member=1996][/member][member=1996][/member]_OnPlayerTakeDamage
HOOK_FORWARD<PlayerTakeDamage>

public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
[2384]{
	P:2("Hooks_OnPlayerGiveDamage called: %d, %d, %f, %d, %d", playerid, damagedid, Float:amount, weaponid, bodypart);
	new
		end   = _:YSI_g_sCallbackEnd[ALS_OnPlayerGiveDamage],
		start = _:YSI_g_sCallbackStart[ALS_OnPlayerGiveDamage],
		ret = ALS_R_PlayerGiveDamage;
	while (start++ != end)
	{
		#emit PUSH.S bodypart
		#emit PUSH.S weaponid
		#emit PUSH.S amount
		#emit PUSH.S damagedid
		#emit PUSH.S playerid
		#emit PUSH.C     16
		#emit CONST.alt  YSI_g_sCallbackAddresses
		#emit LOAD.S.pri start
		//#emit INC.pri
		//#emit STOR.S.pri start
		#emit LIDX
		#emit MOVE.alt
		#emit LCTRL      6
		#emit ADD.C      24
		#emit PUSH.pri
		#emit MOVE.pri
		#emit SCTRL      6
		#emit MOVE.alt
		#emit CONST.pri  0xFFFFFFFE
		#emit AND
		#emit PUSH.pri
		#emit LOAD.S.pri ret
		#emit AND
		#emit POP.alt
		#emit OR
		#emit STOR.S.pri ret
		if (ret < 0) return ret + 1;
	}
	return ret;
}
#if defined _ALS_OnPlayerGiveDamage
	#undef OnPlayerGiveDamage
#else
	#define _ALS_OnPlayerGiveDamage
#endif
#define OnPlayerGiveDamage S[member=1996][/member][member=1996][/member]_OnPlayerGiveDamage
HOOK_FORWARD<PlayerGiveDamage>

Okej dakle uspio sam rijesiti one errore tako sto sam samo to izbrisao od tamo jel mi slicno tome postoji u weapon cfg.
ali sad imam u glavnom modu error
C:\Users\M\Desktop\[CF-RP]GameMode\Uređivanje GameModa!\gamemodes\crown.pwn(52277) : error 021: symbol already defined: "OnPlayerClickPlayer"

[52277]public OnPlayerClickPlayer( playerid, clickedplayerid, source ) {
	new string[ 128 ], name[ MAX_PLAYER_NAME ];
	GetPlayerName( clickedplayerid, name, sizeof( name ) );

    format( string, sizeof( string ), "Ime Igraca: %s\nTelefon: %d\nLevel: %d\nGodine: %d", name, PlayerInfo[ clickedplayerid ][ xBrojTelefona ], PlayerInfo[ clickedplayerid ][ xLevel ], PlayerInfo[ clickedplayerid ][ xGodine ] );
	SPD( playerid, 0, DSMSG, D_NASLOV, string, "OK", "" );
	return true;
}

Nisam uspio narediti može li mi se neko tko zna spojiti i preko anydeska narediti molim vas?