• Welcome to Vice City Multiplayer.
 

[CP] Builder commands.

Started by Ettans, February 20, 2010, 01:31:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ettans

It's just a code-piece of OnPlayerText callback. I only made it because I needed an easy way to change some settings and save raw coordinates, without using the build mode.
Simply replace your OnPlayerText callback with this one, or copy the commands to your own OnPlayerText callback.

Commands


  • !help - Show a list of commands.
  • !slomo <value> - Sets the gamespeed to the given value. If no value is given, it's set to default (100).
  • !gravity <value> - Sets the gravity to the given value. If no value is given, it's set to default (100).
  • !packer - Spawns a Packer at your position and automatically puts you in it.
  • !taxi- Spawns a Taxi at your position and automatically puts you in it.
  • !pcj - Spawns a PCJ600 at your position and automatically puts you in it.
  • !sanchez - Spawns a Sanchez at your position and automatically puts you in it.
  • !fix - Fixes the vehicle you're in.
  • !pos- Shows your current coordinates (x,y,z,angle).
  • !savepos - Saves your current raw coordinates (x,y,z,angle) to savedpos.txt in the /scriptfiles/ folder.

Note: Before using !savepos, make sure you have scriptfiles folder in your server folder, otherwise it'll crash the server.

Example of saved coordinates in savedpos.txt:


346.19,-262.54,35.88,3.11 // x,y,z,angle
444.85,-437.57,10.14,0.04 // x,y,z,angle


Link to code: http://pastebin.com/fbd0d2d4

Currently I'm working on an array with vehicle names and models.

chn batista


[AoD]NC

Quote from: Ettans on February 20, 2010, 01:31:39 PM
It's just a code-piece of OnPlayerText callback. I only made it because I needed an easy way to change some settings and save raw coordinates, without using the build mode.
Indeed.

Great work :) but i wont use it now, but who knows maybe in the future ;).

BCKLUP

#3
Does it save comments like in /s
Example: !savepos SomeShittyPool
or something like that :P

This can be Heavily modified to be a Saveloc and Gotoloc script, right??

Ettans

No, it doesn't accept additional comments, but you can easily change that and yes, you can modify it to make saveloc and gotoloc commands.

BCKLUP

Quote from: Ettans on March 15, 2010, 11:02:29 AM
No, it doesn't accept additional comments, but you can easily change that and yes, you can modify it to make saveloc and gotoloc commands.
Always wanted a gotoloc and saveloc but couldn't make one because of my lack of intelligence with File Management based functions

But with this example i might learn a new "thing" :P
Thank you very much  :)

Devian

 really i try put this cmds on my Gamemode but doesn't work. :/

i get errors:

C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(92) : error 021: symbol already defined: "cmd"
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(92) : error 033: array must be indexed (variable "-unknown-")
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(94) : error 035: argument type mismatch (argument 1)
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(102) : error 035: argument type mismatch (argument 1)
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(118) : error 035: argument type mismatch (argument 1)
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(136) : error 035: argument type mismatch (argument 1)
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(153) : error 035: argument type mismatch (argument 1)
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(172) : error 035: argument type mismatch (argument 1)
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(182) : error 017: undefined symbol "pveh"
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(182) : warning 215: expression has no effect
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(182) : error 001: expected token: ";", but found "]"
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(182) : error 029: invalid expression, assumed zero
C:\Arquivos de programas\Rockstar Games\Grand Theft Auto Vice City\Servers\Pawn-svr\gamemodes\test.pwn(182) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase


12 Errors.


can someone help?!?


Sephiroth

nice but here's something offtopic, I saw [CP] and thought kenny01 brought cherry poppers back :(