25.02.2009, 22:50
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;
}
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;
}