Hello people,
i try to attach a float value to a weapon.
PHP Code:
new String:g_WeaponNames[3][16] = { "weapon_a", "weapon_b", "weapon_c"};
new Float:num[3] = {1.0, 2.0, 3.0};
public OnPluginStart()
{
HookEvent("player_death", EventPlayerDeath);
}
public EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
decl String:weapon[255];
GetEventString(event, "weapon", weapon, sizeof(weapon));
new key = FindStringInArray(g_WeaponNames, weapon);
PrintToChatAll("Debug: \x04%.2f", num[key]);
}
But get an "
error 035: arrgument type mismatch" on findstring line. :/
Any ideas?
Or know someone a better possibility to realize this?
Thank you for the effort.
__________________