02.03.2012, 16:33
try that
And the GetPlayerSpeed function you got is another fail
Search for one which actually uses the pythagorean
pawn Код:
CMD:transform(playerid, params[]) {
new
vehicleid = GetPlayerVehicleID(playerid)
;
if(vehicleid) {
new
Float: x,
Float: v,
Float: v,
Float: a
;
GetVehicleZAngle(vehicleid, a);
GetVehiclePos(vehicleid, x, y, z);
switch(IsTransFormed[playerid]++) {
case 0: (_: a) = CreateVehicle(infernus, x, y, z, a, 0, 0, 15);
case 1: (_: a) = CreateVehicle(rancher, x, y, z, a, 0, 0, 15);
default: (_: a) = CreateVehicle(hydra, x, y, z, a, 0, 0, 15);
}
GetVehicleVelocity(vehicleid, x, y, z);
SetTimer("PutPlayerInTransVehicle", 0, false, "iifff", playerid, _: a, x, y, z);
SendClientMessage(playerid, 0x33AA33AA, "You have transformed your vehicle!");
DestroyVehicle(vehicleid);
}
return true;
}
pawn Код:
forward PutPlayerInTransVehicle(playerid, vehicleid, Float: x, Float: y, Float: z);
public PutPlayerInTransVehicle(playerid, vehicleid, Float: x, Float: y, Float: z) {
PutPlayerInVehicle(playerid, vehicleid, 0);
SetVehicleVelocity(vehicleid, x, y, z);
}
Search for one which actually uses the pythagorean