#include <a_samp>#include <zcmd>new veh;new curr;public OnPlayerEnterVehicle(playerid, vehicleid, ispassanger){curr = GetPlayerVehicleID(playerid);return 1;}CMD:amodel(playerid, params[]){if(IsPlayerInAnyVehicle(playerid) && IsPlayerAdmin(playerid)){new mire, Float: Pos[4];if(sscanf(params, \"i\", mire)) return SendClientMessage(playerid, -1, \"Használat: /amodel <Model>\");if(mire < 400 || mire > 611) return SendClientMessage(playerid, -1, \"Hibás model!\");GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);GetPlayerFacingAngle(playerid, Pos[3]);DestroyVehicle(curr);veh = CreateVehicle(mire, Pos[0], Pos[1], Pos[2], Pos[3], random(126), random(126), 0);PutPlayerInVehicle(playerid, veh, 1);}return 1;}
CMD:amodel(playerid, params[]){new model, vehicleid = GetPlayerVehicleID(playerid);new Float: vx, Float: vy, Float: vz, Float: angle; if(!IsPlayerInAnyVehicle(playerid) ) return SendClientMessage(playerid, -1, \"Nem vagy jármûben!\");if(sscanf(params, \"%d\", model)) return SendClientMessage(playerid, -1, \"Használat: /amodel [model]\");if(model < 400 || model > 611) return SendClientMessage(playerid, -1, \"Érvénytelen model!\");GetVehiclePos(vehicleid, vx, vy, vz), GetVehicleZAngle(playerid, angle);DestroyVehicle(vehicleid); RemovePlayerFromVehicle(playerid);new ujkocsi = CreateVehicle(model, vx, vy, vz, angle, random(5), random(5), 0);PutPlayerInVehicle(playerid, ujkocsi, 0);return 1;}