Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: mrockxkingbutt on March 14, 2014, 09:41:02 pm

Title: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: mrockxkingbutt on March 14, 2014, 09:41:02 pm
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!!
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: MatheuS on March 14, 2014, 10:01:54 pm
why do not you put the timers together in a function?  ???

eg.: Click Here (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.msg7714#msg7714)
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: mrockxkingbutt on March 14, 2014, 10:03:46 pm
why do not you put the timers together in a function?  ???

eg.: Click Here (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.msg7714#msg7714)

if It Is Neccessary? Edited
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: MatheuS on March 15, 2014, 01:18:26 am
why do not you put the timers together in a function?  ???

eg.: Click Here (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.msg7714#msg7714)

if It Is Neccessary? Edited

yes? ._.
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: mrockxkingbutt on March 15, 2014, 11:05:36 am
why do not you put the timers together in a function?  ???

eg.: Click Here (http://vcmp.liberty-unleashed.co.uk/forum/index.php?topic=1247.msg7714#msg7714)

if It Is Neccessary? Edited

yes? ._.

Edited Now!
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: m.viber on April 26, 2014, 05:59:26 pm
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("CheckBank2", 1000, 1);[/pawn]

Post Comments About It

Credits : All By Me!!

Listen I'm new scripter work on my lan server and I put or script in  gusp mode and put this script and nothing happen and I put the ----------// after the last script, I must but another ------------// after that scrptnto work?
And I must but all that commands together in the script mode?

Note: u are good scripter
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: mrockxkingbutt on April 26, 2014, 08:00:29 pm
Rename CheckBank2 From Timer To CheckBank Or It Will Be Stay Bugged!!
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: [NYB]Gino on May 21, 2014, 11:10:11 am
Help Its Saying In My Server

C:\Grand Theft Auto Vice City\gamemodes\GC.pwn(310) : error 017: undefined symbol "GetPlayerLocation"
C:\Grand Theft Auto Vice City\gamemodes\GC.pwn(316) : error 017: undefined symbol "GetPlayerLocation"
Pawn compiler 3.0.3367         Copyright (c) 1997-2005, ITB CompuPhase

2 Errors.
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: dynavolt71 on May 22, 2014, 02:14:33 pm
Copy function you need to your script
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: [NYB]Gino on May 23, 2014, 07:53:08 am
im not using GUPS , IM Using OTher Kind Of Script Not SQ , just im using other pawn server.

i dont know how to fix that when i remove getplayerlocation its bug

 help me please
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: [NYB]fast:p on July 23, 2014, 01:06:41 pm
This is your self !:p
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: MatheuS on July 23, 2014, 05:00:52 pm
im not using GUPS , IM Using OTher Kind Of Script Not SQ , just im using other pawn server.

i dont know how to fix that when i remove getplayerlocation its bug

 help me please

takes the role of GUPS and add to your script
Title: Re: Disable Weapons/ Restore In bank [Snippet By me ]
Post by: [NYB]fast:p on August 21, 2014, 08:37:24 am
Not working!!!!