02.07.2009, 05:47
Try this:
pawn Код:
dcmd_spawn(playerid, params[])
{
Car = strval(params);
if (strlen(params))
{
new Float:angle, Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new car2 = CreateVehicle(Car, x, y, z+2, angle, -1, -1, -1);
PutPlayerInVehicle(playerid, car2, 0);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/spawn [vehicle id]\"");
}
return 1;
}