Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: rathore on March 13, 2014, 11:10:08 pm
-
I want to disable weapons in bank like sky-city server how to do it please help me
-
[pawn]SetTimer("CheckBank", 1000, 1);[/pawn]
Timer & Public Just Add Them!
[pawn]forward CheckBank();
public CheckBank() {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(RobPickup == 1) {
if(GetPlayerLocation(i),"Bank-Little-Havana-Vice-City-Mainland",true) == 0) {
GameTextForPlayer(i," Disabled Your Weapons");
SetPlayerWeapon(i,0,0);
SendClientMessage(i,COLOR_GREEN,"Weapons Diabled");
}
}
}
return 1;
}[/pawn]
-
[pawn]D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 017: undefined symbol "RobPickup"
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : warning 215: expression has no effect
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 001: expected token: ";", but found "]"
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 029: invalid expression, assumed zero
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
4 Errors.[/pawn]
-
[pawn]D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 017: undefined symbol "RobPickup"
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : warning 215: expression has no effect
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 001: expected token: ";", but found "]"
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 029: invalid expression, assumed zero
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
4 Errors.[/pawn]
i changed to this then fixed removed robbank and added strcmp :)
[pawn]forward CheckBank();
public CheckBank() {
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);
SendClientMessage(i,COLOR_GREEN,"Weapons Diabled");
}
}
return 1;
}[/pawn]
-
[pawn]D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 017: undefined symbol "RobPickup"
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : warning 215: expression has no effect
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 001: expected token: ";", but found "]"
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : error 029: invalid expression, assumed zero
D:\GTAVIC~1\GAMEMO~1\GUPS11~1.PWN(239) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
4 Errors.[/pawn]
i changed to this then fixed removed robbank and added strcmp :)
[pawn]forward CheckBank();
public CheckBank() {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(strcmp(GetPlayerLocation(i),"Bank-Little-Havana-Vice-City-Mainland", true) == 1){
GameTextForPlayer(i," Disabled Your Weapons");
SetPlayerWeapon(i,0,0);
SendClientMessage(i,COLOR_GREEN,"Weapons Diabled");
}
}
return 1;
}[/pawn]
Well DOne!
-
So It Works In banks?
-
this cmd removes waepons and big prob it spamming chat
-
To Fix It...
Remove Sendclientmessage(i
then it will not spam
-
In My Server :
C:\Grand Theft Auto Vice City\gamemodes\GC.pwn(203) : error 017: undefined symbol "GetPlayerLocation"
-
Copy it from GUPS