02.05.2012, 15:51
pawn Код:
new Text3D:text;//topo
stock aCreateThing(playerid, thingid, orderid)
{
new Float:X, Float:Y, Float:Z, Float:Angle, Vehicle[MAX_VEHICLES];
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Angle);
if(thingid != 597)
{
Vehicle[orderid] = CreateVehicle(thingid, X, Y, Z + 3, Angle, random(126), random(126), 30);
}
else
{
Vehicle[orderid] = CreateVehicle(thingid, X, Y, Z + 3, Angle, 0, 1, 30);
}
new s[50],n[24];
GetPlayerName(playerid, n, 24);
format(s, 50, "Veiculo de %s [%d]", n, playerid);
text = Create3DTextLabel(s, -1, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( text, Vehicle[orderid], 0.0, 0.0, 2.0);
PutPlayerInVehicle(playerid, Vehicle[orderid], 0);
TogglePlayerControllable(playerid, true);
return 1;
}