21.01.2017, 01:32
I have been doing an experiment lately as a friend of mine informed me that he can manipulate the weapon, Instead of having that plain slow weapon hitman skill, He instead uses a CLEO to manipulate the weapon making his weapon double (having the highest weapon skill). This gives me an idea to check the highest damages given out by these weapons which supports hitman skill.
I don't know if it would be helpful but I am placing down the results I have done via the NPC.
Note: No matter what where I shoot at the bodypart, the damage given to the player will be always the same unless you missed the part a little bit (or if you are in a far distance)
* So far, only Desert Eagle has a damage point changes once the player hits the 200% hitman skill (SetPlayerWeaponSkill)
This is what I used on testing;
I am not sure if this can be used on anything but I have a plan in mind that SetPlayerWeaponSkill should be hooked up with some variable, then i dunno.
I don't know if it would be helpful but I am placing down the results I have done via the NPC.
Note: No matter what where I shoot at the bodypart, the damage given to the player will be always the same unless you missed the part a little bit (or if you are in a far distance)
Weapon | First Result (Damage) | Final Result (Damage) |
M4 | 9.9000 (no skill) | 9.9000 (w/ skill) |
AK47 | 9.9000 (no skill) | 9.9000 (w/ skill) |
Colt 45 (9mm) | 8.2500 (no skill) | 8.2500 (w/ skill) |
Desert Eagle | 23.1000 (no skill) | 46.2000 (w/ 200+ skill) |
Shotgun | 49.5000 (no skill) | 49.5000 (w/ skill) |
Sawnoff | 49.5000 (no skill) | 49.5000 (w/ skill) |
Combat Shotgun | 39.6000 (no skill) | 39.6000 (w/ skill) |
MP5 | 8.2500 (no skill) | 8.2500 (w/ skill) |
UZI/TEC9 | 6.6000 (no skill) | 6.6000 (w/ skill) |
Sniper Rifle | 41.2500 (no skill) | 41.2500 (w/ skill) |
Assault Rifle | 24.7500 (no skill) | 24.7500 (w/ skill) |
This is what I used on testing;
PHP Code:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
new skillsPlayer[MAX_PLAYERS][13];
new const g_aWeaponSlots[] = {
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 8, 8, 8, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11
};
main()
{
print("* Test Maps Gamemode");
}
public OnGameModeInit()
{
SendRconCommand("hostname Test Maps Here - Ronald Lacson");
SetGameModeText("Test Gamemode");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
ConnectNPC("MyBitch", "npcidle");
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))
{
SetSpawnInfo(playerid, 255, 299, -1972.5763, 137.8974, 27.6875, 86.3663, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
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)
{
for(new i; i < 13; i++)
{
skillsPlayer[playerid][i] = 0;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 0);
if(IsPlayerNPC(playerid))
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerFacingAngle(playerid, 269.1425);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerSkin(playerid, 192);
return 1;
}
return 1;
}
CMD:giveskills(playerid, params[])
{
new skill, gun[32], str[128];
if(sscanf(params, "ds[32]", skill, gun))
return SendClientMessage(playerid, -1, "What gun skill doe and how percent. (m4/ak47/9mm/deagle/shotgun/sawnoff/spas/uzi/mp5/sniper)");
if(skill < 0 || skill > 1000)
return SendClientMessage(playerid, -1, "What gun skill doe and how percent. (m4/ak47/9mm/deagle/shotgun/sawnoff/spas/uzi/mp5/sniper)");
format(str, sizeof(str), "* You have set the percent of the skill for the weapon to %d%%", skill);
SendClientMessage(playerid, 0x33AA33FF, str);
if(strcmp(gun, "m4", true) == 0)
{
skillsPlayer[playerid][5] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, skill);
SendClientMessage(playerid, -1, "* You received an M4 skill.");
}
else if(strcmp(gun, "ak47", true) == 0)
{
skillsPlayer[playerid][5] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, skill);
SendClientMessage(playerid, -1, "* You received an AK47 skill.");
}
else if(strcmp(gun, "9mm", true) == 0)
{
skillsPlayer[playerid][2] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, skill);
SendClientMessage(playerid, -1, "* You received a 9mm skill.");
}
else if(strcmp(gun, "deagle", true) == 0)
{
skillsPlayer[playerid][2] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, skill);
SendClientMessage(playerid, -1, "* You received a Deagle skill.");
}
else if(strcmp(gun, "shotgun", true) == 0)
{
skillsPlayer[playerid][3] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, skill);
SendClientMessage(playerid, -1, "* You received a Shotgun skill.");
}
else if(strcmp(gun, "sawnoff", true) == 0)
{
skillsPlayer[playerid][3] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, skill);
SendClientMessage(playerid, -1, "* You received a Sawn Off skill.");
}
else if(strcmp(gun, "spas", true) == 0)
{
skillsPlayer[playerid][3] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, skill);
SendClientMessage(playerid, -1, "* You received a Spa skill.");
}
else if(strcmp(gun, "uzi", true) == 0)
{
skillsPlayer[playerid][4] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, skill);
SendClientMessage(playerid, -1, "* You received an Uzi skill.");
}
else if(strcmp(gun, "mp5", true) == 0)
{
skillsPlayer[playerid][4] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, skill);
SendClientMessage(playerid, -1, "* You received an MP5 skill.");
}
else if(strcmp(gun, "sniper", true) == 0)
{
skillsPlayer[playerid][6] = skill;
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, skill);
SendClientMessage(playerid, -1, "* You received a Sniper Rifle skill.");
}
return 1;
}
CMD:givegun(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, -1, "What gun doe. (m4/ak47/9mm/deagle/shotgun/sawnoff/spas/uzi/mp5/sniper/rifle/tec9)");
if(strcmp(params, "m4", true) == 0)
{
GivePlayerWeapon(playerid, 31, 999999);
SendClientMessage(playerid, -1, "* You received an M4 nigga.");
}
else if(strcmp(params, "ak47", true) == 0)
{
GivePlayerWeapon(playerid, 30, 999999);
SendClientMessage(playerid, -1, "* You received an AK-47 nigga.");
}
else if(strcmp(params, "9mm", true) == 0)
{
GivePlayerWeapon(playerid, 22, 999999);
SendClientMessage(playerid, -1, "* You received a 9mm nigga.");
}
else if(strcmp(params, "deagle", true) == 0)
{
GivePlayerWeapon(playerid, 24, 999999);
SendClientMessage(playerid, -1, "* You received a Deagle nigga.");
}
else if(strcmp(params, "shotgun", true) == 0)
{
GivePlayerWeapon(playerid, 25, 999999);
SendClientMessage(playerid, -1, "* You received a Shotgun nigga.");
}
else if(strcmp(params, "sawnoff", true) == 0)
{
GivePlayerWeapon(playerid, 26, 999999);
SendClientMessage(playerid, -1, "* You received a Sawn Off nigga.");
}
else if(strcmp(params, "spas", true) == 0)
{
GivePlayerWeapon(playerid, 27, 999999);
SendClientMessage(playerid, -1, "* You received a Spas nigga.");
}
else if(strcmp(params, "uzi", true) == 0)
{
GivePlayerWeapon(playerid, 28, 999999);
SendClientMessage(playerid, -1, "* You received an UZI nigga.");
}
else if(strcmp(params, "mp5", true) == 0)
{
GivePlayerWeapon(playerid, 29, 999999);
SendClientMessage(playerid, -1, "* You received an MP5 nigga.");
}
else if(strcmp(params, "sniper", true) == 0)
{
GivePlayerWeapon(playerid, 34, 999999);
SendClientMessage(playerid, -1, "* You received a Sniper nigga.");
}
else if(strcmp(params, "rifle", true) == 0)
{
GivePlayerWeapon(playerid, 33, 999999);
SendClientMessage(playerid, -1, "* You received a Riffle nigga.");
}
else if(strcmp(params, "tec9", true) == 0)
{
GivePlayerWeapon(playerid, 32, 999999);
SendClientMessage(playerid, -1, "* You received a TEC-9 nigga.");
}
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
{
new string[128], bodypartstr[32], weaponstr[32];
GetWeaponName(weaponid, weaponstr, 32);
switch(bodypart)
{
case 3: bodypartstr = "Chest";
case 4: bodypartstr = "Groin";
case 5: bodypartstr = "Left Arm";
case 6: bodypartstr = "Right Arm";
case 7: bodypartstr = "Left Leg";
case 8: bodypartstr = "Right Leg";
case 9: bodypartstr = "Head";
}
format(string, sizeof(string), "* You have damaged the player with weapon %s, Damage given: %.4f (Part of body: %s) (Skill: %d%%)", weaponstr, amount, bodypartstr, skillsPlayer[playerid][g_aWeaponSlots[GetPlayerWeapon(playerid)]]);
SendClientMessage(playerid, -1, string);
return 1;
}