17.03.2010, 15:49
Hello there, i made this code putting a few weapon id's into one value
I have no errors but it only checks the first 'id' every time so what am i doing wrong here ?
Thanks for any help
I have no errors but it only checks the first 'id' every time so what am i doing wrong here ?
Код:
new DetectWeapon; new Fists[] ={0,1,10,11,13,14}; new Melee[]={2,3,5,6,7,8,15};
Код:
if (strcmp(cmdtext, "/checkweps", true) == 0)// { if(GetPlayerWeapon(playerid) == DetectWeapon) { for(new w = 0; w < MAX_PLAYERS; w++) if (DetectWeapon == Fists[w]) { SendClientMessage(playerid, COLOR_WHITE, "you have a weapon in categorie fists"); return 1; } for(new w = 0; w < MAX_PLAYERS; w++) if (DetectWeapon == Melee[w]) { SendClientMessage(playerid, COLOR_WHITE, "you have a handwep"); return 1; } return 1; } return 0; }