#include <a_samp>#include <zcmd>#include <dini>#include <sscanf>public OnFilterScriptInit() {new file[20];for(new i = 0; i < MAX_VEHICLES; i++) { format(file, sizeof(file), \"%d.ini\", i); if(dini_Exists(file)) return SetVehicleNumberPlate(i, dini_Get(file, \"Numberplate\")); SetVehicleToRespawn(i);}return 1;}CMD:rendszam(playerid, params[]) {new file[20], platestr[20], vehicleid = GetPlayerVehicleID(playerid);new Float:X, Float:Y, Float:Z, Float:A;if(sscanf(params, \"s\", platestr)) return SendClientMessage(playerid, 0xFF0000FF, \"USAGE: /setnumberplate [string]\");if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, \"Nem ülsz jármûben!\");format(file, sizeof(file), \"%d.ini\", vehicleid);GetPlayerPos(playerid, X, Y, Z); GetVehicleZAngle(vehicleid, A);SetVehicleNumberPlate(vehicleid, platestr);SetVehicleToRespawn(vehicleid);SetVehiclePos(vehicleid, X, Y, Z);SetVehicleZAngle(vehicleid, A);PutPlayerInVehicle(playerid, vehicleid, 0);if(!dini_Exists(file)) dini_Create(file);dini_Set(file, \"Numberplate\", platestr);return 1;}
#include <a_samp>#include <dini>#include <sscanf>#include <zcmd>#define VEH_FILE \"vehicles.ini\"public OnFilterScriptInit() {new plate[20]; for(new i = 0; i < MAX_VEHICLES; i++) { format(plate, sizeof(plate), \"%d\", i); if(dini_Exists(VEH_FILE)) return SetVehicleNumberPlate(i, dini_Get(VEH_FILE, plate)); SetVehicleToRespawn(i); } return 1;}CMD:rendszam(playerid, params[]) {new platestr[20], string[20], vehicleid = GetPlayerVehicleID(playerid);new Float:X, Float:Y, Float:Z, Float:A;if(sscanf(params, \"s\", platestr)) return SendClientMessage(playerid, 0xFF0000FF, \"USAGE: /setnumberplate [string]\");if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, \"Nem ülsz jármûben!\");GetPlayerPos(playerid, X, Y, Z); GetVehicleZAngle(vehicleid, A);SetVehicleNumberPlate(vehicleid, platestr);SetVehicleToRespawn(vehicleid);SetVehiclePos(vehicleid, X, Y, Z);SetVehicleZAngle(vehicleid, A);PutPlayerInVehicle(playerid, vehicleid, 0);format(string, sizeof(string), \"%d\", vehicleid);if(!dini_Exists(VEH_FILE)) dini_Create(VEH_FILE);dini_Set(VEH_FILE, string, platestr);return 1;}