SA-MP Forums Archive
[Help] Change script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Change script (/showthread.php?tid=66956)



[Help] Change script - Dragonheart - 25.02.2009

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;
}


Re: [Help] Change script - Norn - 25.02.2009

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.


Re: [Help] Change script - Dragonheart - 25.02.2009

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


Re: [Help] Change script - brett7 - 25.02.2009

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


Re: [Help] Change script - Dragonheart - 26.02.2009

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