21.06.2012, 19:29
Well i am putting in a tazer system and i know this sounds silly but i am having trouble getting the tazer in the right position of the hand right now the tazer is at the wrist area i need to move it down slightly i have tried for ages i just cant do it..
Second question is how am i able to do this.. When a player types /impoundcar and they are in the area and all of that how can i make it so the car that its towing will disappear and sit in a different virtual world so the player cant reach it.. I cant figure out how to do this
Here is my code for towing the car
And /impoundcar
If you need any more code just let me know
Thanks
pawn Код:
SetPlayerAttachedObject(playerid, 3,18642,6,0.0,0.0,0.0,0.0,120.60,0.0);
Here is my code for towing the car
pawn Код:
if(IsKeyJustDown(KEY_ACTION, newkeys, oldkeys))
{
new towtruckid = GetVehicleModel(GetPlayerVehicleID(playerid));
if (towtruckid == 525 || towtruckid == 552)
{
if(GetPlayerState(playerid)==2)
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
new Float:vX,Float:vY,Float:vZ;
new Found=0;
new vid=0;
while((vid<MAX_VEHICLES)&&(!Found))
{
vid++;
GetVehiclePos(vid,vX,vY,vZ);
if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
{
Found=1;
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
}
else
{
AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
SendClientMessage(playerid, WHITE, "Deliver this car to the checkpoint");
SetPlayerCheckpoint(playerid, 1657.4601,-1713.4954,15.6094, 4.0);
Player[playerid][Checkpoint] = 99;
Player[playerid][Towing] = 1;
}
}
}
}
else
{
SendClientMessage(playerid, WHITE, "You need to be the driver!");
return 1;
}
}
}
pawn Код:
command(impoundcar, playerid, params[])
{
#pragma unused params
new vehicleid;
vehicleid == GetPlayerVehicleID(playerid);
if(Player[playerid][AbleToImpound] == 0)
{
SendClientMessage(playerid, WHITE, "You are not at the impound.");
}
else
{
if(Player[playerid][AbleToImpound] == 1 || IsPlayerInRangeOfPoint(playerid, 15.0, 1658.1001,-1711.9711,15.6094))
{
if(IsTrailerAttachedToVehicle(vehicleid))
{
SetVehicleVirtualWorld(vehicleid, 10);
}
}
}
}
Thanks