Ingame Vehicle Creator
#1

Anyone know a filterscript that have vehicle ingame creator? a command like /createveh <id> place it somewhere. or something like that and easy to use. I search around the forum but i only found ingame object editor but they dont have vehicle editor on it.
Reply
#2

Maybe if you go in Debug mode, and type /vsel you can get vehicles
Reply
#3

try this stock make any command youd like

pawn Code:
stock TryVehicleSpawn(playerid,vModel)
{
    new
        Float:X,
        Float:Y,
        Float:Z,
        Float:A,
        vehicle_id,
        col1,
        col2;

    if (!IsPlayerInAnyVehicle(playerid)){
        col1 = random(129),col2 = random(129);
        GetPlayerPos( playerid, X, Y, Z );
        GetPlayerFacingAngle(playerid, A);
        vehicle_id = CreateVehicle( vModel, X, Y, Z, A,col1,col2,0 );
        LinkVehicleToInterior(vehicle_id, GetPlayerInterior(playerid));
        PutPlayerInVehicle(playerid, vehicle_id, 0);
    }
    else
    {
        SendClientMessage(playerid,0x00FF00AA,"You're already in a vehicle.");
    }
}
this will put the player in the vehicle.

pawn Code:
//usage:

TryVehicleSpawn(playerid,401);
and heres a simple command using sscanf/zcmd.

pawn Code:
CMD:v(playerid,params[])
{
    new vModel;
    if (sscanf(params,"i",vModel)) return SendClientMessage(playerid,0x00FF00AA,"/v [ModelID]");
    if (400 > vModel > 611) return SendClientMessage(playerid,0x00FF00AA,"/v [ModelID]");
    TryVehicleSpawn(playerid,vModel);
    return 1;
}

EDIT:
and to the guy below, strtok SHOULD NEVER BE USED FOR THIS.
Reply
#4

new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp("/car", cmdtext, true, 4) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
if(!cmdtext[4])return SendClientMessage(playerid, 0xFF0000FF, "/car id");
new tmp[30];
tmp = strtok(cmdtext, idx);
new car = strval(tmp);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(car, x+1, y, z+1, 1, 0, 0, 600);
return 1;
}
Reply
#5

Use SA-MP debug
Reply
#6

Quote:
Originally Posted by [MM]RoXoR[FS]
View Post
Maybe if you go in Debug mode, and type /vsel you can get vehicles
I already have a gamemode stunt so i dont want to go all over again. The problem is whenever i go to a stunt map. there is no vehicles so i just want to make a vehicles on that map.

Anyway can i use debug in gamemode im using?
Reply
#7

Quote:
Originally Posted by .-.Piero.-.
View Post
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp("/car", cmdtext, true, 4) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
if(!cmdtext[4])return SendClientMessage(playerid, 0xFF0000FF, "/car id");
new tmp[30];
tmp = strtok(cmdtext, idx);
new car = strval(tmp);
new Float, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
CreateVehicle(car, x+1, y, z+1, 1, 0, 0, 600);
return 1;
}
The instruction at "0x100110ec" referenced memory 0"0x00000044" The memory could not be "read"
Reply
#8

Quote:
Originally Posted by Jonny5
View Post
try this stock make any command youd like

pawn Code:
stock TryVehicleSpawn(playerid,vModel)
{
    new
        Float:X,
        Float:Y,
        Float:Z,
        Float:A,
        vehicle_id,
        col1,
        col2;

    if (!IsPlayerInAnyVehicle(playerid)){
        col1 = random(129),col2 = random(129);
        GetPlayerPos( playerid, X, Y, Z );
        GetPlayerFacingAngle(playerid, A);
        vehicle_id = CreateVehicle( vModel, X, Y, Z, A,col1,col2,0 );
        LinkVehicleToInterior(vehicle_id, GetPlayerInterior(playerid));
        PutPlayerInVehicle(playerid, vehicle_id, 0);
    }
    else
    {
        SendClientMessage(playerid,0x00FF00AA,"You're already in a vehicle.");
    }
}
this will put the player in the vehicle.

pawn Code:
//usage:

TryVehicleSpawn(playerid,401);
and heres a simple command using sscanf/zcmd.

pawn Code:
CMD:v(playerid,params)
{
    new vModel;
    if (sscanf(params,"i",vModel) return SendClientMessage(playerid,0x00FF00AA,"/v [ModelID]");
    if (400 > vModel > 611) return SendClientMessage(playerid,0x00FF00AA,"/v [ModelID]");
    TryVehicleSpawn(playerid,vModel);
    return 1;
}

EDIT:
and to the guy below, strtok SHOULD NEVER BE USED FOR THIS.
OMG! Bro can you send me a complete pwn of this?? i think your work will gonna work
Reply
#9

Quote:
Originally Posted by kbalor
View Post
The instruction at "0x100110ec" referenced memory 0"0x00000044" The memory could not be "read"
#include "../include/gl_common.inc"
Reply
#10

Quote:
Originally Posted by mickos0087
View Post
Use SA-MP debug
Im using someones gamemode do you think its possible to use debug?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)