Skin menü:Parancs:[pawn]if(!strcmp(\"/skin\", cmdtext, true)){ ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_INPUT, \"Skin\",\"Írd be annak a skinnek az ID-jét\\namelyiket használni szeretnéd!\",\"Ok\",\"Mégse\"); return 1;}[/pawn]Az OnDialogResponse alá:[pawn]if(dialogid == DIALOGID){ if(response) { if(IsValidSkin(strval(inputtext))){ SetPlayerSkin(playerid, strval(inputtext));}else{ ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_INPUT, \"Skin\",\"Írd be annak a skinnek az ID-jét\\namelyiket használni szeretnéd!\",\"Ok\",\"Mégse\"); } } return 1;}[/pawn]IsValidSkin(skinid):[pawn]IsValidSkin(skinid){ #define MAX_BAD_SKINS 9 new badSkins[MAX_BAD_SKINS] = { 74, 265, 266, 267, 268, 269, 270, 271, 272 }; if (skinid < 0 || skinid > 299) return false; for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins) return false; } #undef MAX_BAD_SKINS return 1;}[/pawn]Jármû lehívó:[pawn]#include <a_samp>#include <zcmd>#include <sscanf2>#define COLOR_GRAD1 0xB4B5B7FF#define COLOR_GRAD2 0xBFC0C2FF#define COLOR_GREEN 0x008000FFnew CreatedCars[100];new CreatedCar = 0;new Float: x, Float: y, Float: z;CMD:car(playerid, params[]){new str[64];new car, color1, color2;if(sscanf(params, \"iii\", car, color1, color2)){ SendClientMessage(playerid, COLOR_GRAD2, \"Használat: /veh [modellid] [color1] [color2]\"); return 1;}if(car <= 400 || car >= 611) { SendClientMessage(playerid, COLOR_GRAD1, \"Kocsi idnek 400 és 611 közt kell lennie!\"); return 1; }if(color1 <= 0 || color1 >= 255) { SendClientMessage(playerid, COLOR_GRAD1, \"Szín 1 idnek 0 és 255 közt kell lennie!\"); return 1; }if(color2 <= 0 || color2 >= 255) { SendClientMessage(playerid, COLOR_GRAD1, \"Szín 2 idnek 0 és 255 közt kell lennie!\"); return 1; }GetPlayerPos(playerid, x,y,z);new carid = CreateVehicle(car, x,y,z, 0.0, color1, color2, 60000);CreatedCars[CreatedCar] = carid;CreatedCar ++;format(str, sizeof(str), \"Jármû lekérve. ID: %d\", carid);SendClientMessage(playerid, COLOR_GREEN, str);return 1;}[/pawn]Fegyver menü: Link
dcmd_car(playerid, params[]){new Index; new tmp[256]; tmp = strtok(params,Index);new tmp2[256]; tmp2 = strtok(params,Index);new tmp3[256]; tmp3 = strtok(params,Index); if(!strlen(tmp)) returnSendClientMessage(playerid, COLOR_RED, \"{FF0000}Használat: {057CEA}/car {33FF33}[modelid/jármûnév] {CDF917}[szín1] {33CCFF}[szín2]\");new car;new string[128];new colour1, colour2; if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);if(car < 400 || car > 611) return SendClientMessage(playerid, BALTA, \"{FF0000}Hiba: Nincs ilyen jármû!\");if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3); if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);new Float:X,Float:Y,Float:Z;new Float:Angle,int1;new LVehicleID = GetPlayerVehicleID(playerid);GetPlayerPos(playerid, X,Y,Z);GetPlayerFacingAngle(playerid,Angle);int1 = GetPlayerInterior(playerid);SpawnedVehicles[playerid] = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1);LinkVehicleToInterior(LVehicleID,int1);PlayerPlaySound(playerid,1085,0,0,0);PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);format(string, sizeof(string), \"{FF0000}Jármû lerakva! {057CEA}Név: %s | {33FF33}(Model ID: %d) |{CDF917} Szín1: %d, {33CCFF}Szín2: %d\", VehicleNames[car-400], car, colour1, colour2);return SendClientMessage(playerid,COLOR_ORANGE,string);}
CMD:car(playerid, params[])