[pawn]
new wep[126]; new targetname[32]; targetname[0] = FindPlayerIDFromString(tmp);
wep[0] = FindWepIDFromString(tmp2);
[/pawn]
There's no need to use arrays for these. This is sufficient:
[pawn]
new wep; new targetname;
targetname = FindPlayerIDFromString(tmp);
wep = FindWepIDFromString(tmp2);
[/pawn]
[pawn]
printf("%s(%d) has given %s(%d) weapon %s ammo %d - /c wepequip", gPlayers[playerid], playerid, gPlayers[strval(targetname)], strval(targetname), wep, tmp3);
format(szMsg, 256, "You have been issued %s with %d ammo", wep, tmp3);
[/pawn]
Replace with:
[pawn]
printf("%s(%d) has given %s(%d) weapon %s ammo %d - /c wepequip", gPlayers[playerid], playerid, gPlayers[targetname], targetname, gWeapons[wep], strval(tmp3));
format(szMsg, 256, "You have been issued %s with %d ammo", gWeapons[wep], strval(tmp3));
[/pawn]
[pawn]
format(szMsg, 256, "You issued %s with %d ammo to %s(%d)", wep, tmp3, gPlayers[strval(targetname)], strval(targetname));
SendClientMessage(playerid, GREEN, szMsg);
[/pawn]
This isn't necessary since everyone is going to see the "ADMIN (0) has given PLAYER( 1) weapon GUN ammo 9999." including the admin.
[pawn]
SetPlayerWeapon(strval(targetname), strval(wep), strval(tmp3));
[/pawn]
Replace with:
[pawn]
SetPlayerWeapon(targetname, wep, strval(tmp3));
[/pawn]
The main problem was that you were trying to set the weapon and player in an array. However, numbers in an array can also be parsed as a string, so strval might's seen it as "Q." This isn't an integer, and can lead to some odd results. See if the suggestions I posted above work.