Compiler quits responding
#1

I've just made a simple /myweps command, which will get the player's weapon's, their name, and ammo, and return each one like:

Weapon: M4 Ammo: 29

But the compiler stops work anyone know why?

pawn Код:
COMMAND:myweapons(playerid, params[])
{
        new weapons[13][2], string[150];
        for (new i = 0; i < 13; i++)
        {
            GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
        }
        GetWeaponName(playerid,weapons,sizeof(weapons));
        format(string,sizeof(string),"Weapon Name: %s Ammo: %d", weapons[i][0], weapons[i][1]);
        SendClientMessage(playerid, COLOR_GREY,string);
        return 1;
}
Reply
#2

Why the hell did you make this for:
pawn Код:
GetPlayerName(playerid,weapons[i][0],weapons[i][1]);
?
That will do nothing.
Reply
#3

Woops, fixed that and tried to compile, still not working...
Reply
#4

pawn Код:
COMMAND:myweapons(playerid, params[])
{
        new weapons[13][2], string[150];
        for (new i = 0; i < 13; i++)
        {
            GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
            GetWeaponName(playerid,weapons,sizeof(weapons));
            format(string,sizeof(string),"Weapon Name: %s Ammo: %d", weapons[i][0], weapons[i][1]);
            SendClientMessage(playerid, COLOR_GREY,string);
            return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)