[Help] Change script
#1

hi, can someone change this script from the V-Admin FS so that vehicles spawn beside me and not ON me, its kinda irritating that i almost always gets bugged in the vehicle.


if(strcmp(cmd, "/v", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2) return DenyMessage(playerid, 2);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v [carid] [color] [color]");
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "Vehicle Model can't be below 400 or above 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_WHITE, "Color Number can't be below 0 or above 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) return SendClientMessage(playerid, COLOR_WHITE, "Color Number can't be below 0 or above 126 !");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateVehicle(car, X,Y+2,Z, 0.0, color1, color2, 1500000);
SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(car, GetPlayerInterior(playerid));
return 1;
}
Reply
#2

Quote:
Originally Posted by Dragonheart
hi, can someone change this script from the V-Admin FS so that vehicles spawn beside me and not ON me, its kinda irritating that i almost always gets bugged in the vehicle.


if(strcmp(cmd, "/v", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 2) return DenyMessage(playerid, 2);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v [carid] [color] [color]");
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "Vehicle Model can't be below 400 or above 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_WHITE, "Color Number can't be below 0 or above 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) return SendClientMessage(playerid, COLOR_WHITE, "Color Number can't be below 0 or above 126 !");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateVehicle(car, X,Y+2,Z, 0.0, color1, color2, 1500000);
SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(car, GetPlayerInterior(playerid));
return 1;
}
Post in the V-ADMIN thread.
Reply
#3

lol, did you realy think i havent but no1 answer so i thought i might try here instead.
Reply
#4

change
Код:
CreateVehicle(car, X,Y+2,Z, 0.0, color1, color2, 1500000);
to
Код:
CreateVehicle(car, X,Y+5,Z, 0.0, color1, color2, 1500000);
or what ever
Reply
#5

lol omg really, it was just that easy? damn! well thx alot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)