I need some help., please.
#1

Hey, I really need some help, i'm looking for a little script, so say if someone does, /vx (vehiclename) it will spawn them in the car,I'm typically new to scripting so i really need some help, i've attempted it but i can't do it, can someone put on a script for this command? Please. Thanks.
Reply
#2

Bro, ******s nor Search function on this forum doesnt hurts.
https://sampforum.blast.hk/showthread.php?tid=99956

~LetsOWN
Reply
#3

ive tried and tried, i just cant fine it :/
Reply
#4

pawn Код:
if(strcmp( cmd, "/vx", true ) == 0 )
    {
        new Float:X, Float:Y, Float:Z;
        new tmp[256];
        new created_vehicle_id;
        tmp = strtok( cmdtext, idx );

        GetPlayerPos( playerid, X, Y, Z );

        created_vehicle_id = CreateVehicle( strval(tmp), X+2, Y+2, Z, 0, 0, 0, -1 );

        new msg[256];
        format(msg,256,"Created vehicle: %d",created_vehicle_id);
        SendClientMessage(playerid,0xAAAAAAAA,msg);

        return 1;
    }
Reply
#5

Lool, ain't i posted link to thread?

Mby now will be easier.

http://solidfiles.com/d/1vNc/download

Download / Place .amx file to /filterscript folder (where are your server files located) / in server.cfg find line filterscripts (or something kinda this) and write spawner / join server/ check if working (or not) / have fun if yes / cry and read topic https://sampforum.blast.hk/showthread.php?tid=99956 / be gratefull for me and more for script maker

~LetsOWN

@Edit @ up

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
pawn Код:
if(strcmp( cmd, "/vx", true ) == 0 )
    {
        new Float:X, Float:Y, Float:Z;
        new tmp[256];
        new created_vehicle_id;
        tmp = strtok( cmdtext, idx );

        GetPlayerPos( playerid, X, Y, Z );

        created_vehicle_id = CreateVehicle( strval(tmp), X+2, Y+2, Z, 0, 0, 0, -1 );

        new msg[256];
        format(msg,256,"Created vehicle: %d",created_vehicle_id);
        SendClientMessage(playerid,0xAAAAAAAA,msg);

        return 1;
    }
It could make crash, while you'll use /vx blablabla or return error :P
Reply
#6

thanks guys
Reply
#7

Or maybe use zcmd processor.
Reply
#8

C:\Users\Serenity\Desktop\MMM.pwn(2644) : error 017: undefined symbol "cmd"
C:\Users\Serenity\Desktop\MMM.pwn(2649) : error 017: undefined symbol "strtok"
C:\Users\Serenity\Desktop\MMM.pwn(2649) : error 033: array must be indexed (variable "tmp")

:S
Reply
#9

@ Tinsler, your welcome

@Naruto_Emilio, doesn't matter which way of command detect he will use. It'll cause (should) crash or lag if he write /vx blablablablabal.

You've to do something to avoid it, e.g.

new CarNames[]{"Turismo","Tahoma",...}; and lots more.

~Lets
Reply
#10

I have no idea what your talking about sorry It's just i've just started up my movie server, and this other movieserver i use to play on has /vx and it spawns you in any car you decide, instead of spawning it and then having to enter the vehicle..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)