Its A Working System Of Weapons That Are Bugged In Pawn Fixed By Me! Added new!
Its Features
Disable Weapon Feature! ( Fixed )
Restore Weapon Originaly! ( Fixed )
SetPlayerWeapon ( New Fixed )
GetPlayerWeapon ( New Totally Fixed )
Started The Commands
OnPlayerCommandText
else if(strcmp(cmd,"restore", true) == 0) {
GameTextForPlayer(playerid," Weapon Restored ");
jRestoreWeapons(playerid);
return 1;
}
else if(strcmp(cmd,"disable", true) == 0) {
GameTextForPlayer(playerid," Weapon Disabled ");
jDisableWeapons(playerid);
return 1;
}
else if(strcmp(cmd,"jwep", true) == 0) {
new tmp[123];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) SendClientMessage(playerid,COLOR_RED," usage /c jwep [wepid] [ammos] [category-1/2/3]");
else {
new category[123], ammo[123];
ammo = strtok(cmdtext,idx);
category = strtok(cmdtext,idx);
jSetPlayerWeapon(playerid,strval(tmp),strval(ammo),strval(category));
SendClientMessage(playerid,COLOR_GREEN," Weapon Excuted ");
}
return 1;
}
add this
new Weapon1[MAX_PLAYERS];
new Weapon2[MAX_PLAYERS];
new Weapon3[MAX_PLAYERS];
new Wep1[MAX_PLAYERS];
new Wep2[MAX_PLAYERS];
new Wep3[MAX_PLAYERS];
add publics
public jSetPlayerWeapon(playerid,wep,ammo,categry) {
if(categry == 1) {
SetPlayerWeapon(playerid,wep,ammo);
Weapon1[playerid] = wep;
Wep1[playerid] = wep;
}
if(categry == 2) {
SetPlayerWeapon(playerid,wep,ammo);
Wep2[playerid] = wep;
Weapon2[playerid] = wep;
}
if(categry == 3) {
SetPlayerWeapon(playerid,wep,ammo);
Weapon3[playerid] = wep;
Wep3[playerid] = wep;
}
return 1;
}
public jGetPlayerWeapon(playerid) {
return Weapon1[playerid], Weapon2[playerid], Weapon3[playerid];
}
public jRestoreWeapons(playerid) {
SetPlayerWeapon(playerid,Wep1[playerid],1000);
SetPlayerWeapon(playerid,Wep2[playerid],1000);
SetPlayerWeapon(playerid,Wep3[playerid],1000);
SendClientMessage(playerid, COLOR_GREEN," Weapons Have Been Restored ");
return 1;
}
public jDisableWeapons(playerid) {
Wep1[playerid] = Weapon1[playerid];
Wep3[playerid] = Weapon3[playerid];
Wep2[playerid] = Weapon2[playerid];
SetPlayerWeapon(playerid,0,0);
SendClientMessage(playerid, COLOR_GREEN," Weapons Have Been Disabled ");
return 1;
}