04.04.2011, 12:44
for the dcmd question:
(hope that works, just wrote it up)
for the rest: I don't really get what you mean
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(vehicle, 7, cmdtext);
return 0;
}
dcmd_vehicle(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid, COLOR, "/vehicle [id]");
new v = strval(params);
if(v < 400 || v > 611) return SendClientMessage(playerid, COLOR, "Invalid vehicleid");
new Float:x, Float:y, Float:z, Float:az;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, az);
x += (5.00 * floatsin(-a, degrees));
y += (5.00* floatcos(-a, degrees));
CreateVehicle(v, x, y, z, a-90, -1, -1, -1);
return 1;
}
for the rest: I don't really get what you mean