VC:MP 0.3 > Snippet Showroom

Disable Weapons/ Restore In bank [Snippet By me ]

(1/3) > >>

mrockxkingbutt:
Add [pawn]new WasPlayerInBank[MAX_PLAYERS];[/pawn]

Now Add Publics

[pawn]
forward CheckBank();
public CheckBank() {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(WasPlayerInBank == 1) {
if(strcmp(GetPlayerLocation(i),"Bank-Little-Havana-Vice-City-Mainland", true) == 1) {
GameTextForPlayer(i," Restored Your Weapons ");
SetPlayerWeapon(i,19,1000);
SetPlayerWeapon(i,22,1000);
WasPlayerInBank = 0;
for(new i = 0; i < MAX_PLAYERS; i++) {
if(strcmp(GetPlayerLocation(i),"Bank-Little-Havana-Vice-City-Mainland", true) == 0) {
GameTextForPlayer(i," Disabled Your Weapons");
SetPlayerWeapon(i,0,0);
WasPlayerInBank = 1;
}
}
}
}
}
return 1;
}[/pawn]

Now Add Timers In OnGameModeInit
[pawn]
SetTimer("CheckBank", 1000, 1);[/pawn]

Post Comments About It

Credits : All By Me!!

MatheuS:
why do not you put the timers together in a function?  ???

eg.: Click Here

mrockxkingbutt:

--- Quote from: MatheuS on March 14, 2014, 10:01:54 pm ---why do not you put the timers together in a function?  ???

eg.: Click Here

--- End quote ---

if It Is Neccessary? Edited

MatheuS:

--- Quote from: mrockxkingbutt on March 14, 2014, 10:03:46 pm ---
--- Quote from: MatheuS on March 14, 2014, 10:01:54 pm ---why do not you put the timers together in a function?  ???

eg.: Click Here

--- End quote ---

if It Is Neccessary? Edited

--- End quote ---

yes? ._.

mrockxkingbutt:

--- Quote from: MatheuS on March 15, 2014, 01:18:26 am ---
--- Quote from: mrockxkingbutt on March 14, 2014, 10:03:46 pm ---
--- Quote from: MatheuS on March 14, 2014, 10:01:54 pm ---why do not you put the timers together in a function?  ???

eg.: Click Here

--- End quote ---

if It Is Neccessary? Edited

--- End quote ---

yes? ._.

--- End quote ---

Edited Now!

Navigation

[0] Message Index

[#] Next page

Go to full version