09.02.2012, 04:57
when i use this code to change my plate
my car respawns at a different angle
anyone have any ideas as to why?
or how to fix this?
thanks for any advice you can give.
my car respawns at a different angle
anyone have any ideas as to why?
or how to fix this?
thanks for any advice you can give.
pawn Код:
YCMD:plate(playerid, params[], help)
{
if(!IsPlayerAdmin(playerid)) return 0; // this is an admin only script
if (help)
{
SendClientMessage(playerid, 0xFF0000AA, "Change your cars plate.");
}
else
{
new
str[128];
if (isnull(params))
{
format(str, sizeof (str), "Usage: \"/%s [Text]\"", Command_GetDisplayNamed("plate", playerid));
SendClientMessage(playerid, 0xFF0000AA, str);
}
else
{
new vehicle_id;
vehicle_id = GetPlayerVehicleID(playerid);
if(vehicle_id > 0)
{
new Float:x, Float:y, Float:z,Float:a;
GetVehiclePos(vehicle_id,x,y,z);
GetVehicleZAngle(vehicle_id, a);
SetVehicleNumberPlate(vehicle_id, params);
SetVehicleToRespawn(vehicle_id);
SetVehicleZAngle(vehicle_id, a);
SetVehiclePos(vehicle_id,x,y,z);
PutPlayerInVehicle(playerid,vehicle_id,0);
format(str, sizeof (str), "Plate Changed to \"%s\"",params);
SendClientMessage(playerid, 0xFF0000AA, str);
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You must be in a Vehicle.");
}
}
}
return 1;
}