19.05.2014, 11:33
(
Последний раз редактировалось JokerK; 19.05.2014 в 23:51.
)
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid) { if(issuerid == INVALID_PLAYER_ID) return 1; // Skip if Damaged player is invalid new Text3D:bar3D, damageStr[HEALTH_LENGTH]; valstr(damageStr, floatround(amount)); bar3D = Create3DTextLabel(damageStr, COLOR_RED, 0.0, 0.0, 0.0, HEALTH_DRAW, 0); Attach3DTextLabelToPlayer(bar3D, playerid, 0.0, 0.0, HEALTH_OFFSET); SetTimerEx("UpdateDamageBar", TIME_FIRST, 0, "iiffii", playerid, _:bar3D, amount, HEALTH_OFFSET, 16, COLOR_RED); return 1; } if(IsPlayerConnected(issuerid) && gTeam[issuerid] == gTeam[playerid]) { new Float:PHP, Float:IHP; GetPlayerHealth(playerid, PHP); GetPlayerHealth(issuerid, IHP); SetPlayerHealth(playerid, PHP + amount); SetPlayerHealth(issuerid, IHP - amount); GameTextForPlayer(issuerid,"~r~Team-killing!",2000,3); } return 1; } }
Код:
C:\Documents and Settings\net\Desktop\TDM server\TDM server\TDM server\samp03z_svr_R1_win32\gamemodes\TDM.pwn(1023) : error 010: invalid function or declaration C:\Documents and Settings\net\Desktop\TDM server\TDM server\TDM server\samp03z_svr_R1_win32\gamemodes\TDM.pwn(1027) : error 021: symbol already defined: "GetPlayerHealth" C:\Documents and Settings\net\Desktop\TDM server\TDM server\TDM server\samp03z_svr_R1_win32\gamemodes\TDM.pwn(1030) : error 021: symbol already defined: "SetPlayerHealth" C:\Documents and Settings\net\Desktop\TDM server\TDM server\TDM server\samp03z_svr_R1_win32\gamemodes\TDM.pwn(1034) : error 010: invalid function or declaration C:\Documents and Settings\net\Desktop\TDM server\TDM server\TDM server\samp03z_svr_R1_win32\gamemodes\TDM.pwn(1057) : warning 203: symbol is never used: "IHP" C:\Documents and Settings\net\Desktop\TDM server\TDM server\TDM server\samp03z_svr_R1_win32\gamemodes\TDM.pwn(1057) : warning 203: symbol is never used: "PHP"