Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: ForOver on Oct 21, 2017, 02:23 PM

Title: How to make commands works (!) instad of (/)?
Post by: ForOver on Oct 21, 2017, 02:23 PM
Since i downloaded Blank Server, When i open main.nut with text editor, i see many commands work with /, but guys how to make all commands work as !
example: !heal, etc
so guys please give me a example
Title: Re: How to make commands works (!) instad of (/)?
Post by: D4rkR420R on Oct 22, 2017, 07:56 PM
You have to make a workaround in onPlayerChat & onPlayerCommand to verify if the player used the ! prefix.
Title: Re: How to make commands works (!) instad of (/)?
Post by: ForOver on Oct 22, 2017, 08:22 PM
hmmmmmmmm how
Title: Re: How to make commands works (!) instad of (/)?
Post by: D4rkR420R on Oct 23, 2017, 05:55 AM
Quote from: ForOver on Oct 22, 2017, 08:22 PMhmmmmmmmm how

Use text.find(0,1) to identify the first character of the string.
Title: Re: How to make commands works (!) instad of (/)?
Post by: Xmair on Oct 23, 2017, 09:16 AM
text.find what, actually text.slice( 0, 1 ) would be the first alphabet of the text
Title: Re: How to make commands works (!) instad of (/)?
Post by: D4rkR420R on Oct 24, 2017, 05:57 AM
Quote from: Xmair on Oct 23, 2017, 09:16 AMtext.find what, actually text.slice( 0, 1 ) would be the first alphabet of the text

My bad :3