Put this behind of another new in the top of the script
[pawn]new PickCash[MAX_PLAYERS];[/pawn]
Put this in OngameModeInit
[pawn]AddStaticPickup(120,501,-944.65417,-343.91436,7.22693); // this is the location of the bank vault[/pawn]
Add this in OnPickedUp
[pawn] if(pickupid == 120) {
format(string, sizeof(string), "%s take $ 1000 from the Bank", gPlayers[playerid]);
SendClientMessageToAll(AMARILLO, string);
IncPlayerHandCash(playerid,1000);
TogglePlayerControllable(playerid,0);
SetTimer( "Cash", 10000,false);
PickCash[playerid] = 1;
}[/pawn]
Put this in the end of the script
[pawn]//================================================================
public Cash() {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(PickCash == 1) {
SendClientMessage(i,0xFFFF00AA,"You picked up $1000!");
TogglePlayerControllable(i,1);
PickCash = 0;
}
}
}
}
//==============================================================================[/pawn]