Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: mrockxkingbutt on March 17, 2014, 04:12:06 pm

Title: New Fixed GetPlayerWeapon+ SetPlayerWeapon+ DisableWeapon+ Restore Weapon[By me]
Post by: mrockxkingbutt on March 17, 2014, 04:12:06 pm
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;
}


Title: Re: New Fixed GetPlayerWeapon+ SetPlayerWeapon+ DisableWeapon+ Restore Weapon[By me]
Post by: NE.Restricted on March 17, 2014, 04:21:19 pm
F ired
A lone
I nternationally
L ost
FAIL!!!!
Title: Re: New Fixed GetPlayerWeapon+ SetPlayerWeapon+ DisableWeapon+ Restore Weapon[By me]
Post by: mrockxkingbutt on March 18, 2014, 04:15:26 pm
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!
Title: Re: New Fixed GetPlayerWeapon+ SetPlayerWeapon+ DisableWeapon+ Restore Weapon[By me]
Post by: MatheuS on March 18, 2014, 06:56:00 pm
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