26.04.2017, 08:32
How do I loop to all the player's weapons, and put all of their names in a dialog. Here's all of my resources, but I still don't know how to use them.
Weapon Loop - KingHual
Weapon Names - NealPeteros
Weapon Loop - KingHual
Код:
new weapons[13][2]; for (new i = 0; i < 13; i++) { GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]); } if(weapons[input the weapon slot here][0] == weapon id) { //do something }
Код:
new gunname1[24], gunname2[24], gunname3[24], gunname4[24], gunname5[24], gunname6[24], gunname7[24], gunname8[24], gunname9[24], gunname10[24], weapon1, weapon2, weapon3, weapon4, weapon5, weapon6, weapon7, weapon8, weapon9, weapon10; weapon1 = PlayerInfo[playerid][pWeapon1]; weapon2 = PlayerInfo[playerid][pWeapon2]; weapon3 = PlayerInfo[playerid][pWeapon3]; weapon4 = PlayerInfo[playerid][pWeapon4]; weapon5 = PlayerInfo[playerid][pWeapon5]; weapon6 = PlayerInfo[playerid][pWeapon6]; weapon7 = PlayerInfo[playerid][pWeapon7]; weapon8 = PlayerInfo[playerid][pWeapon8]; weapon9 = PlayerInfo[playerid][pWeapon9]; weapon10 = PlayerInfo[playerid][pWeapon10]; GetWeaponName(weapon1, gunname1, sizeof(gunname1)); GetWeaponName(weapon2, gunname2, sizeof(gunname2)); GetWeaponName(weapon3, gunname3, sizeof(gunname3)); GetWeaponName(weapon4, gunname4, sizeof(gunname4)); GetWeaponName(weapon5, gunname5, sizeof(gunname5)); GetWeaponName(weapon6, gunname6, sizeof(gunname6)); GetWeaponName(weapon7, gunname7, sizeof(gunname7)); GetWeaponName(weapon8, gunname8, sizeof(gunname8)); GetWeaponName(weapon9, gunname9, sizeof(gunname9)); GetWeaponName(weapon10, gunname10, sizeof(gunname10));