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!!