Towing Code wont work?? - 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: Towing Code wont work?? (
/showthread.php?tid=87765)
Towing Code wont work?? -
Luciano - 22.07.2009
I use DCMD (but i regret it and thought that i'd give it a try. I made a /tow command (nothing huge just /tow <id>). But it doesnt seem to work?
Код:
dcmd_tow(playerid, params[])
{
if(strlen(params))
{
new id = strval(params);
if(IsPlayerConnected(id) && playerid != id)
{
if(IsPlayerInAnyVehicle(id) && GetVehicleModel(GetPlayerVehicleID(playerid) == 525))
{
if(IsPlayerAdmin(playerid))
{
AttachTrailerToVehicle(GetPlayerVehicleID(id),GetPlayerVehicleID(playerid));
SendClientMessage(playerid, COLOR_GOLD, "You are towing somebody!");
SendClientMessage(id, COLOR_GOLD, "You are being towed!");
}else{
SendClientMessage(playerid, COLOR_GOLD, "You arn't an administrator!");
}
}
}else{
SendClientMessage(playerid, COLOR_GOLD, "Player is disconnected or is yourself!");
}
}else{
SendClientMessage(playerid, COLOR_GOLD, "Usage: /tow [playerid] - Tow a player's car");
}
}
Thanks: Luciano
Re: Towing Code wont work?? -
yezizhu - 22.07.2009
Cannot attch vec which has driver.
Idk how about passanger
Re: Towing Code wont work?? -
Luciano - 22.07.2009
ooooooooooooooooh thanks cool!
Re: Towing Code wont work?? -
yezizhu - 22.07.2009
It's my pleasure.
Please read
this , thx.