2 problem with script
#1

pawn Код:
GetPlayerPos(killerid,X,Y,Z);
    GetPlayerName(playerid,Nam,sizeof(Nam));
    GetPlayerName(killerid,pname, sizeof(pname));
    GetWeaponName(weap,WeapName,32);
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i,5,X,Y,Z))
        {
            format(str,sizeof(str),"%s has been killed by %s. Weapon: %s",Nam,pname,WeapName);
            SendClientMessage(i,orange,str);
        }
    }
Well the problem is
1.For the weapon it shows Weapon: it doesnt show the weapon name
Reply
#2

Do you have the weapon names defined?
Reply
#3

yea, it works properly with /giveweapon
Reply
#4

bump
Reply
#5

Show us how "weap" gets its value
Reply
#6

my weap is
pawn Код:
new weap;
Reply
#7

Well that's why... how do you expect it to return a result if you haven't given it a value?

GetWeaponName needs a Weapon ID (i.e 24 for Desert Eagle) for it to return the name of that weapon ID.

If this was in OnPlayerDeath, replace "weap" with "reason"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)