16
mIRC/pawn Scripting / Re: Who can give me an empty script?Please~~
« on: August 05, 2013, 02:33:35 pm »
download vcmp mode it is the same what u said
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I think u forgot to put new string[128];
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) {
new string[128];
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]
All the public functions must be forwarded, if my memory serves me. So, else:
[pawn]forward Cash();[/pawn]
in the top
I think your memory failure, as the settimer I use is "false" only works once, and starts at the pick the pickup if I remember correctly takes more than 30 seconds to appear
remember that you died for something