03.01.2010, 09:40
HI, I've got a problem.
The server gives everyone a random weapons when they spawn. I don't want that they get granades and a rocket launcher together. One of them get exchanged for a minigun or tear gas. So I wrote that code below, but it doesn't work. Is anybody capable to help me? TIA
The server gives everyone a random weapons when they spawn. I don't want that they get granades and a rocket launcher together. One of them get exchanged for a minigun or tear gas. So I wrote that code below, but it doesn't work. Is anybody capable to help me? TIA
Код:
new myweapon[13][2]; new newweapon[]={17,38}; new wRandom=random(sizeof(newweapon)); GetPlayerWeaponData(playerid,7,myweapon[7][0],myweapon[7][1]); GetPlayerWeaponData(playerid,8,myweapon[8][0],myweapon[8][1]); if(myweapon[7][0]==35&&myweapon[8][0]==16)GivePlayerWeapon(playerid,newweapon[wRandom],random(9998)+1); GetPlayerWeaponData(playerid,7,myweapon[7][0],myweapon[7][1]); GetPlayerWeaponData(playerid,8,myweapon[8][0],myweapon[8][1]); RLorG_owner[playerid]=0; if(myweapon[8][0]==16)RLorG_owner[playerid]+=1; else if(myweapon[7][0]==35)RLorG_owner[playerid]+=2;