31.05.2012, 17:00
pawn Код:
CMD:givecar(playerid,params[])
{
new carid;
new id;
new Float:X, Float:Y, Float:Z, Float:angle;
if(sscanf(params,"du",carid, id)) return SendClientMessage(playerid,-1,"Error: - /givecar [car id] [player id]"); // checking does sscanf found integer parameter
GetPlayerPos(id, X, Y, Z);
GetPlayerFacingAngle(id, angle);
CreateVehicle(carid, X, Y, Z, angle, 0, 1, 60);
PutPlayerInVehicle(id, carid, 0);
return 1;
}