Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: RPM_Ranger on January 15, 2010, 02:40:58 am
-
Can somebody who's good at scripting please do this for me plz
the regular FBSv0.2 i want everytime a player joins that they would automatically get an admin level 5 level.
Please and Thank You
Here it is:
http://deathsquad-clan.com/vc-mp/FBS_v0.2_Release.zip (http://deathsquad-clan.com/vc-mp/FBS_v0.2_Release.zip)
-
just one question at beginning you mean spawn or register?
-
Find this line
!writeini -n vcmp.users.ini LEVELS $vcmp.name($1, $2) 1
Replace with
!writeini -n vcmp.users.ini LEVELS $vcmp.name($1, $2) 5
Find this one
vcmp.msg $1 $2 Name: $vcmp.name($1, $2) $+ , Level: 1 $+ , Pass: $4-
Replace with
vcmp.msg $1 $2 Name: $vcmp.name($1, $2) $+ , Level: 5 $+ , Pass: $4-
-
GUS / FBS AND PSYSCRIPT PEOPLE CAN USE THIS
/*
** NOTE:
**
** The following alias adds, replaces or removes
** a command and its admin level in cmd.ini,
** keeping the levels in numerical sequence.
** Syntax:
** SetCommandLevel <NewCmd> <NewCmdLvl>
** Examples:
** SetCommandLevel !givecash 5 ; Add or Replace
** SetCommandLevel !givecash DEL ; Delete
*/
alias SetCommandLevel {
var %NewCmd = $1, %NewCmdLvl = $2
var %file = cmd.ini, %section = COMMANDS
; Creat Hidden Window
window -h @cmds
var %a = 1, %b = 2, %c = 1, %t
; Total Commands
%t = $ini(%file,%section,0)
; Hold %file in buffer
while (%a <= %t) { echo @cmds $ini(%file,%section,%a) $readini(%file,%section,$ini(%file,%section,%a)) | inc %a }
; Insert, Replace or remove
; New-Command to buffer
if ($2 isnum) {
$iif( $fline(@cmds,$+(*,%NewCmd,*),1), !rline @cmds $fline(@cmds,$+(*,%NewCmd,*),1) %NewCmd %NewCmdLvl, !aline @cmds %NewCmd %NewCmdLvl )
}
elseif ($2 == DEL) { dline @cmds $fline(@cmds,$+(*,%NewCmd,*),1) }
; Remove original section/values
!remini %file %section
; Readd Section
!write -il1 %file $+([,%section,])
; Sort by level
filter -wwcut 2 32 @cmds @cmds
; Loop through buffer and write back contents
while $line(@cmds,%c) { var %cmd = $gettok($v1,1,32), %lvl = $gettok($v1,2,32) | !write -il $+ %b %file $+(%cmd,=,%lvl) | !inc %b | !inc %c }
; Close window
window -c @cmds
}
-
This is not what he means, He means the admin level of the player. Not of the level needed for a command.
-
sorry. can anyone help me with this?
i can add commands, how to remove using this way
alias test {
; Commands to add (separated by space)
var %strCmds = !buycar=1 !sellcar=1 !mycars=1, %a = 1
; Loop through strCmds and pass to "SetCommandLevel"
while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$chr(61),$chr(32)) | inc %a }
}
-
just one question at beginning you mean spawn or register?
Whenever they register
They automatically get Admin Level 5
Please and Thank you
-
sorry. can anyone help me with this?
i can add commands, how to remove using this way
alias test {
; Commands to add (separated by space)
var %strCmds = !buycar=1 !sellcar=1 !mycars=1, %a = 1
; Loop through strCmds and pass to "SetCommandLevel"
while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$chr(61),$chr(32)) | inc %a }
}
I DID IT: HERE IS IT IN ONE
/*
** NOTE:
**
** The following alias adds, replaces or removes
** a command and its admin level in cmd.ini,
** keeping the levels in numerical sequence.
** Syntax:
** SetCommandLevel <NewCmd> <NewCmdLvl>
** Examples:
** SetCommandLevel !givecash 5 ; Add or Replace
** SetCommandLevel !givecash DEL ; Delete
*/
alias SetCommandLevel {
var %NewCmd = $1, %NewCmdLvl = $2
var %file = cmd.ini, %section = COMMANDS
; Create Hidden Window
window -h @cmds
var %a = 1, %b = 2, %c = 1, %t
; Total Commands
%t = $ini(%file,%section,0)
; Hold %file in buffer
while (%a <= %t) { echo @cmds $ini(%file,%section,%a) $readini(%file,%section,$ini(%file,%section,%a)) | inc %a }
; Insert, Replace or remove
; New-Command to buffer
if ($2 isnum) {
$iif( $fline(@cmds,$+(*,%NewCmd,*),1), !rline @cmds $fline(@cmds,$+(*,%NewCmd,*),1) %NewCmd %NewCmdLvl, !aline @cmds %NewCmd %NewCmdLvl )
}
elseif ($2 == DEL) { dline @cmds $fline(@cmds,$+(*,%NewCmd,*),1) }
; Remove original section/values
!remini %file %section
; Readd Section
!write -il1 %file $+([,%section,])
; Sort by level
filter -wwcut 2 32 @cmds @cmds
; Loop through buffer and write back contents
while $line(@cmds,%c) { var %cmd = $gettok($v1,1,32), %lvl = $gettok($v1,2,32) | !write -il $+ %b %file $+(%cmd,=,%lvl) | !inc %b | !inc %c }
; Close window
window -c @cmds
}
alias AddMultipleCmds {
; Commands to add (separated by space)
var %a, %strCmds = !buycar=1 !sellcar=1 !mycars=1
; Loop through strCmds and pass to "SetCommandLevel"
while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$chr(61),$chr(32)) | inc %a }
; Remove multipe commands from cmd.ini
; while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$mid($gettok(%strCmds,%a,32),$pos($gettok(%strCmds,%a,32),=), $len($gettok(%strCmds,%a,32))), $chr(32) DEL) | inc %a }
}
-
sorry. can anyone help me with this?
i can add commands, how to remove using this way
alias test {
; Commands to add (separated by space)
var %strCmds = !buycar=1 !sellcar=1 !mycars=1, %a = 1
; Loop through strCmds and pass to "SetCommandLevel"
while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$chr(61),$chr(32)) | inc %a }
}
I DID IT: HERE IS IT IN ONE
/*
** NOTE:
**
** The following alias adds, replaces or removes
** a command and its admin level in cmd.ini,
** keeping the levels in numerical sequence.
** Syntax:
** SetCommandLevel <NewCmd> <NewCmdLvl>
** Examples:
** SetCommandLevel !givecash 5 ; Add or Replace
** SetCommandLevel !givecash DEL ; Delete
*/
alias SetCommandLevel {
var %NewCmd = $1, %NewCmdLvl = $2
var %file = cmd.ini, %section = COMMANDS
; Create Hidden Window
window -h @cmds
var %a = 1, %b = 2, %c = 1, %t
; Total Commands
%t = $ini(%file,%section,0)
; Hold %file in buffer
while (%a <= %t) { echo @cmds $ini(%file,%section,%a) $readini(%file,%section,$ini(%file,%section,%a)) | inc %a }
; Insert, Replace or remove
; New-Command to buffer
if ($2 isnum) {
$iif( $fline(@cmds,$+(*,%NewCmd,*),1), !rline @cmds $fline(@cmds,$+(*,%NewCmd,*),1) %NewCmd %NewCmdLvl, !aline @cmds %NewCmd %NewCmdLvl )
}
elseif ($2 == DEL) { dline @cmds $fline(@cmds,$+(*,%NewCmd,*),1) }
; Remove original section/values
!remini %file %section
; Readd Section
!write -il1 %file $+([,%section,])
; Sort by level
filter -wwcut 2 32 @cmds @cmds
; Loop through buffer and write back contents
while $line(@cmds,%c) { var %cmd = $gettok($v1,1,32), %lvl = $gettok($v1,2,32) | !write -il $+ %b %file $+(%cmd,=,%lvl) | !inc %b | !inc %c }
; Close window
window -c @cmds
}
alias AddMultipleCmds {
; Commands to add (separated by space)
var %a, %strCmds = !buycar=1 !sellcar=1 !mycars=1
; Loop through strCmds and pass to "SetCommandLevel"
while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$chr(61),$chr(32)) | inc %a }
; Remove multipe commands from cmd.ini
; while (%a <= $numtok(%strCmds,32)) { SetCommandLevel $replace($gettok(%strCmds,%a,32),$mid($gettok(%strCmds,%a,32),$pos($gettok(%strCmds,%a,32),=), $len($gettok(%strCmds,%a,32))), $chr(32) DEL) | inc %a }
}
Dude your like in my thread can you take that somewhere else