public OnPlayerTakeDamage(playerid, playerid2, arg2, arg3, arg4) { if(65535 != playerid2 && arg3 == 34 && arg4 == 9) { new var0[100], var1[24], var2[24]; GetPlayerName(playerid, var1, 24); GetPlayerName(playerid2, var2, 24); format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, playerid2); SendClientMessageToAll(0x00F00FFF, var0); GameTextForPlayer(playerid2, "~r~Headshot", 2000, 3); PlayerPlaySound(playerid2, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~r~Headshot", 2000, 3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); SetPlayerHealth(playerid, 0.0); } return 1; } public OnPlayerConnect(playerid) { new var0[24], var1[46]; GetPlayerName(playerid, var0, 24); format(var1, 46, "%s has joined the server", var0); SendClientMessageToAll(0xAAAAAAAA, var1); return 1; } public OnPlayerDisconnect(playerid, reason) { new var0[24], var1[63]; GetPlayerName(playerid, var0, 24); switch(reason) { case 0: format(var1, 63, "%s has left the server. (Lost Connection)", var0); case 1: format(var1, 63, "%s has left the server. (Leaving)", var0); case 2: format(var1, 63, "%s has left the server. (Kicked)", var0); } SendClientMessageToAll(0xAAAAAAAA, var1); return 1; }
Remove Post
Because 1>You Are Giving AMX 2> Too Easy Too Make HeadShot System Too Easy Code:
public OnPlayerTakeDamage(playerid, playerid2, arg2, arg3, arg4) { if(65535 != playerid2 && arg3 == 34 && arg4 == 9) { new var0[100], var1[24], var2[24]; GetPlayerName(playerid, var1, 24); GetPlayerName(playerid2, var2, 24); format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, playerid2); SendClientMessageToAll(0x00F00FFF, var0); GameTextForPlayer(playerid2, "~r~Headshot", 2000, 3); PlayerPlaySound(playerid2, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~r~Headshot", 2000, 3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); SetPlayerHealth(playerid, 0.0); } return 1; } public OnPlayerConnect(playerid) { new var0[24], var1[46]; GetPlayerName(playerid, var0, 24); format(var1, 46, "%s has joined the server", var0); SendClientMessageToAll(0xAAAAAAAA, var1); return 1; } public OnPlayerDisconnect(playerid, reason) { new var0[24], var1[63]; GetPlayerName(playerid, var0, 24); switch(reason) { case 0: format(var1, 63, "%s has left the server. (Lost Connection)", var0); case 1: format(var1, 63, "%s has left the server. (Leaving)", var0); case 2: format(var1, 63, "%s has left the server. (Kicked)", var0); } SendClientMessageToAll(0xAAAAAAAA, var1); return 1; } |
E:\My Servers\AW\gamemodes\AW.pwn(9933) : error 025: function heading differs from prototype
public OnPlayerTakeDamage(playerid, arg2, arg3, arg4, issuerid, Float: amount, weaponid) { if(65535 != issuerid && arg3 == 34 && arg4 == 9) { new var0[100], var1[24], var2[24]; GetPlayerName(playerid, var1, 24); GetPlayerName(issuerid, var2, 24); format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, issuerid); SendClientMessageToAll(0x00F00FFF, var0); GameTextForPlayer(issuerid, "~r~Headshot", 2000, 3); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~r~Headshot", 2000, 3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); SetPlayerHealth(playerid, 0.0); }
boi i use ur code and see which error i got
Code:
E:\My Servers\AW\gamemodes\AW.pwn(9933) : error 025: function heading differs from prototype Code:
public OnPlayerTakeDamage(playerid, arg2, arg3, arg4, issuerid, Float: amount, weaponid) { if(65535 != issuerid && arg3 == 34 && arg4 == 9) { new var0[100], var1[24], var2[24]; GetPlayerName(playerid, var1, 24); GetPlayerName(issuerid, var2, 24); format(var0, 100, "[RBot]:%s(%i) was shoot to the head by %s(%i)", var1, playerid, var2, issuerid); SendClientMessageToAll(0x00F00FFF, var0); GameTextForPlayer(issuerid, "~r~Headshot", 2000, 3); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); GameTextForPlayer(playerid, "~r~Headshot", 2000, 3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); SetPlayerHealth(playerid, 0.0); } |
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != 0xFFFF && GetPlayerWeapon(issuerid) > 21 && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
}
return 0;
}
You could just make it yourself
PHP Code:
|