Author Topic: New Fixed GetPlayerWeapon+ SetPlayerWeapon+ DisableWeapon+ Restore Weapon[By me]  (Read 3554 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
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

Code: [Select]
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

Code: [Select]
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

Code: [Select]
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;
}


My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline NE.Restricted

  • Wiseguy
  • **
  • Posts: 97
    • View Profile
F ired
A lone
I nternationally
L ost
FAIL!!!!
I am NE.CrystalBlue!!!
Quote
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
F ired
A lone
I nternationally
L ost
FAIL!!!!

What The FUck Noob~
iTs WOrking And Also Tested In All Scripts! Noob Kind Of Dickhead!
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline MatheuS

  • Made Man
  • ***
  • Posts: 207
  • Pawn And Squirrel Scripter
    • View Profile
    • Brazillian Community
F ired
A lone
I nternationally
L ost
FAIL!!!!

What The FUck Noob~
iTs WOrking And Also Tested In All Scripts! Noob Kind Of Dickhead!

Keep Calm  :o