#1

hello,when i add 2 file scripts (both have dialogs) the first one i added works and the second shows the dialog but when i select somwthing ther nothing happens pppplzzz i need help i cant make the server untill i fix this problme it is about a plugins or something else ? and i changed the DIAlLOG IDS For one script even that it wont works











(srry for posting 2 times but i need a fix)
Reply
#2

Make sure this too, It's is different among others and not used in gamemode too.
Reply
#3

i cant get you man look here are the codes
pawn Код:
/*
.:[Vehicle Spawner V. 1.2]:. by x96664
Please don't remove my credits!
Use /v to open vehicle dialog.
*/

#include <a_samp>
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
//Colors
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_WHITE2 {FFFFFF}
#define COLOR_RED 0xff0000a7
#define COLOR_RED2 {FF0000}
//RC vehicles
#define RC_BANDIT   441
#define RC_BARON    464
#define RC_GOBLIN   501
#define RC_RAIDER   465
#define D_TRAM      449
#define RC_TIGER    564
#define RC_CAM      594
//Dialogs                           I'm using bigger dialog ids to don't make conflict with your server dialogs.
#define Dialog_Unique_Vehicle 10000
#define Dialog_Trailers_Vehicle 10001
#define Dialog_Boats_Vehicle 10002
#define Dialog_Station_Vehicle 10003
#define Dialog_Sport_Vehicle 10004
#define Dialog_Saloon_Vehicle 10005
#define Dialog_Public_Service_Vehicle 10006
#define Dialog_Off-Road_Vehicle 10007
#define Dialog_Low-Rider_Vehicle 10008
#define Dialog_Industry_Vehicle 10009
#define Dialog_Convertable_Vehicle 10010
#define Dialog_Bike_Vehicle 10011
#define Dialog_Helicopters 10012
#define Dialog_Airplanes 10013
#define Dialog_Rc_Vehicle 10014
#define Dialog_Vehicle 10015
//Defines
#define MAX_PLAYERVEHICLES 1
#define VehicleSpawnerLimit 1
//Forward
forward VehicleSpawner(playerid,model);
forward VehicleDeleter(vehicleid);
forward VehicleReseter(vehicleid);
forward VehicleSpawnerLimiter(playerid);
//new
new VehicleSpawn[MAX_PLAYERS];
new PlayerVehicle[MAX_PLAYERS][MAX_PLAYERVEHICLES];
new Turn[MAX_PLAYERS];
//vehicles
new Airplanes[] = { 592, 577, 511, 512, 593, 520, 553, 476, 519, 460, 513 };
new Helicopters[] = { 548, 425, 417, 487, 488, 497, 563, 447, 469 };
new Bikes[] = { 581, 509, 481, 462, 521, 463, 510, 522, 461, 448, 471, 468, 586 };
new Convertibles[] = { 480, 533, 439, 555 };
new Industrials[] = { 499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554 };
new Lowriders[] = { 536, 575, 534, 567, 535, 566, 576, 412 };
new Offroad[] = { 568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 495 };
new Public[] = { 416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 598, 597, 599, 432, 601, 420 };
new Saloons[] = { 445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421 };
new Sport[] = { 602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477 };
new Station[] = { 418, 404, 479, 458, 561 };
new Boats[] = { 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 };
new Trailers[] = { 435, 450, 591, 606, 607, 610, 569, 590, 584, 570, 608, 611 };
new Unique[] = { 485, 537, 457, 483, 508, 532, 486, 406, 530, 538, 434, 545, 588, 571, 572, 423, 442, 428, 409, 574, 449, 525, 583, 539 };
new RC_Vehicles[] = { 441, 464, 465, 501, 564, 594 };

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("|Vehicle spawner by x96664 loaded!  |");
    print("--------------------------------------\n");
    SetTimer("VehicleSpawnLimiter", 1000, true);
    return 1;
}

public OnFilterScriptExit()
{   print("\n--------------------------------------");
    print("|Vehicle spawner by x96664 unloaded!  |");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(v, 1,cmdtext);
return 0;
}
dcmd_v(playerid, params[])
{
#pragma unused params
ShowVehicleDialog(playerid);
return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

    if(newkeys == KEY_SECONDARY_ATTACK ){
        if(!IsPlayerInAnyVehicle(playerid)){
            new Float:x, Float:y, Float:z, vehicle;
            GetPlayerPos(playerid, x, y, z );
            GetVehicleWithinDistance(playerid, x, y, z, 20.0, vehicle);

            if(IsVehicleRc(vehicle)){
              PutPlayerInVehicle(playerid, vehicle, 0);
            }
        }

        else {
            new vehicleID = GetPlayerVehicleID(playerid);
            if(IsVehicleRc(vehicleID) || GetVehicleModel(vehicleID) == RC_CAM){
              if(GetVehicleModel(vehicleID) != D_TRAM){
                new Float:x, Float:y, Float:z;
                GetPlayerPos(playerid, x, y, z);
                SetPlayerPos(playerid, x+0.5, y, z+1.0);
                }
            }
        }
    }
}
GetVehicleWithinDistance( playerid, Float:x1, Float:y1, Float:z1, Float:dist, &veh){
    for(new i = 1; i < MAX_VEHICLES; i++){
        if(GetVehicleModel(i) > 0){
            if(GetPlayerVehicleID(playerid) != i ){
            new Float:x, Float:y, Float:z;
            new Float:x2, Float:y2, Float:z2;
            GetVehiclePos(i, x, y, z);
            x2 = x1 - x; y2 = y1 - y; z2 = z1 - z;
            new Float:vDist = (x2*x2+y2*y2+z2*z2);
            if( vDist < dist){
            veh = i;
            dist = vDist;
                }
            }
        }
    }
}
IsVehicleRc( vehicleid ){
  new model = GetVehicleModel(vehicleid);
  switch(model){
  case RC_GOBLIN, RC_BARON, RC_BANDIT, RC_RAIDER, RC_TIGER: return 1;
  default: return 0;
    }

  return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid== Dialog_Vehicle)
{
if ( response==1 )
{
if(listitem==0)ShowPlayerDialog( playerid, Dialog_Airplanes, 2, "{ffffff}Airplanes:", "Andromada\nAT-400\nBeagle\nCropduster\nDodo\nHydra     {FF0000}(Admin only)\nNevada\nRustler\nShamal\nSkimmer\nStuntplane", "Spawn", "Back" );
if(listitem==1)ShowPlayerDialog( playerid, Dialog_Helicopters, 2, "{ffffff}Helicopters:", "Cargobob\nHunter     {FF0000}(Admin only)\nLeviathan\nMaverick\nNews Maverick\nPolice Maverick\nRaindance\nSeasparrow     {FF0000}(Admin only)\nSparrow", "Spawn", "Back" );
if(listitem==2)ShowPlayerDialog( playerid, Dialog_Bike_Vehicle, 2, "{ffffff}Bikes:", "BF-400\nBike\nBMX\nFaggio\nFCR-900\nFreeway\nMountain Bike\nNRG-500\nPCJ-600\nPizzaboy\nQuad\nSanchez\nWayfarer", "Spawn", "Back" );
if(listitem==3)ShowPlayerDialog( playerid, Dialog_Convertable_Vehicle, 2, "{ffffff}Convertibles:", "Comet\nFeltzer\nStallion\nWindsor", "Spawn", "Back" );
if(listitem==4)ShowPlayerDialog( playerid, Dialog_Industry_Vehicle, 2, "{ffffff}Industrial:", "Benson\nBobcat\nBurrito\nBoxville\nBoxburg\nCement Truck\nDFT-30\nFlatbed\nLinerunner\nMule\nNewsvan\nPacker\nPetrol Tanker\nPony\nRoadtrain\nRumpo\nSadler\nSadler Shit\nTopfun\nTractor\nTrashmaster\nUtility Van\nWalton\nYankee\nYosemite", "Spawn", "Back" );
if(listitem==5)ShowPlayerDialog( playerid, Dialog_Low-Rider_Vehicle, 2, "{ffffff}Lowriders:", "Blade\nBroadway\nRemington\nSavanna\nSlamvan\nTahoma\nTornado\nVoodoo", "Spawn", "Back" );
if(listitem==6)ShowPlayerDialog( playerid, Dialog_Off-Road_Vehicle, 2, "{ffffff}Off Road:", "Bandito\nBF Injection\nDune\nHuntley\nLandstalker\nMesa\nMonster\nMonster A\nMonster B\nPatriot\nRancher A\nRancher B\nSandking", "Spawn", "Back" );
if(listitem==7)ShowPlayerDialog( playerid, Dialog_Public_Service_Vehicle, 2, "{ffffff}Public Service Vehicles:", "Ambulance\nBarracks\nBus\nCabbie\nCoach\nCop Bike (HPV-1000)\nEnforcer\nFBI Rancher\nFBI Truck\nFiretruck\nFiretruck LA\nPolice Car (LSPD)\nPolice Car (LVPD)\nPolice Car (SFPD)\nRanger\nRhino     {FF0000}(Admin only)\nS.W.A.T\nTaxi", "Spawn", "Back" );
if(listitem==8)ShowPlayerDialog( playerid, Dialog_Saloon_Vehicle, 2, "{ffffff}Saloons:", "Admiral\nBloodring Banger\nBravura\nBuccaneer\nCadrona\nClover\nElegant\nElegy\nEmperor\nEsperanto\nFortune\nGlendale Shit\nGlendale\nGreenwood\nHermes\nIntruder\nMajestic\nManana\nMerit\nNebula\nOceanic\nPicador\nPremier\nPrevion\nPrimo\nSentinel\nStafford\nSultan\nSunrise\nTampa\nVincent\nVirgo\nWillard\nWashington", "Spawn", "Back" );
if(listitem==9)ShowPlayerDialog( playerid, Dialog_Sport_Vehicle, 2, "{ffffff}Sport Vehicles:", "Alpha\nBanshee\nBlista Compact\nBuffalo\nBullet\nCheetah\nClub\nEuros\nFlash\nHotring Racer\nHotring Racer A\nHotring Racer B\nInfernus\nJester\nPhoenix\nSabre\nSuper GT\nTurismo\nUranus\nZR-350", "Spawn", "Back" );
if(listitem==10)ShowPlayerDialog( playerid, Dialog_Station_Vehicle, 2, "{ffffff}Station Wagons:", "Moonbeam\nPerenniel\nRegina\nSolair\nStratum", "Spawn", "Back" );
if(listitem==11)ShowPlayerDialog( playerid, Dialog_Boats_Vehicle, 2, "{ffffff}Boats:", "Coastguard\nDinghy\nJetmax\nLaunch\nMarquis\nPredator\nReefer\nSpeeder\nSquallo\nTropic", "Spawn", "Back" );
if(listitem==12)ShowPlayerDialog( playerid, Dialog_Trailers_Vehicle, 2, "{ffffff}Trailers:", "Article Trailer\nArticle Trailer 2\nArticle Trailer 3\nBaggage Trailer A\nBaggage Trailer B\nFarm Trailer\nFreight Flat Trailer (Train)\nFreight Box Trailer (Train)\nPetrol Trailer\nStreak Trailer (Train)\nStairs Trailer\nUtility Trailer", "Spawn", "Back" );
if(listitem==13)ShowPlayerDialog( playerid, Dialog_Unique_Vehicle, 2, "{ffffff}Unique Vehicles:", "Baggage\nBrownstreak (Train)\nCaddy\nCamper\nCamper A\nCombine Harvester\nDozer\nDumper\nForklift\nFreight (Train)\nHotknife\nHustler\nHotdog\nKart\nMower\nMr Whoopee\nRomero\nSecuricar\nStretch\nSweeper\nTram\nTowtruck\nTug\nVortex", "Spawn", "Back" );
if(listitem==14)ShowPlayerDialog( playerid, Dialog_Rc_Vehicle, 2, "{ffffff}RC Vehicles:", "RC Bandit\nRC Baron\nRC Raider\nRC Goblin\nRC Tiger\nRC Cam", "Spawn", "Back" );
}
}
//Airplanes
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Airplanes:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 5: //Hydra
                {
                if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000a7, "You must be logged-in as administrator to spawn {FFFFFF}Hydra{FF0000} !");
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Airplanes[ listitem ]);
                }
    }
    }
}
}
//Helicopters
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Helicopters:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 1:
                {
                if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000a7, "You must be logged-in as administrator to spawn {FFFFFF}Hunter{FF0000} !");
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 7:
                {
                if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000a7, "You must be logged-in as administrator to spawn {FFFFFF}Seasparrow{FF0000} !");
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Helicopters[ listitem ]);
                }
    }
    }
}
}
//Bikes
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Bike_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
                case 12:
                {
                VehicleSpawner(playerid,Bikes[ listitem ]);
                }
    }
    }
}
}
//Convertibles
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Convertable_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Convertibles[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Convertibles[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Convertibles[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Convertibles[ listitem ]);
                }
    }
    }
}
}
//Industrial
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Industry_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 12:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 13:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 14:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 15:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 16:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 17:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 18:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 19:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 20:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 21:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 22:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 23:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
                case 24:
                {
                VehicleSpawner(playerid,Industrials[ listitem ]);
                }
    }
    }
}
}
//Lowriders
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Low-Rider_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Lowriders[ listitem ]);
                }
    }
    }
}
}
//Off-road
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Off-Road_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
                case 12:
                {
                VehicleSpawner(playerid,Offroad[ listitem ]);
                }
    }
    }
}
}
//Public Service
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Public_Service_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 12:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 13:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 14:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 15:
                {
                if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000a7, "You must be logged-in as administrator to spawn {FFFFFF}Rhino{FF0000} !");
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 16:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
                case 17:
                {
                VehicleSpawner(playerid,Public[ listitem ]);
                }
    }
    }
}
}
//Saloons
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Saloon_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 12:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 13:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 14:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 15:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 16:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 17:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 18:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 19:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 20:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 21:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 22:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 23:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 24:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 25:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 26:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 27:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 28:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 29:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 30:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 31:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 32:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
                case 33:
                {
                VehicleSpawner(playerid,Saloons[ listitem ]);
                }
    }
    }
}
}
//Sport
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Sport_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 12:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 13:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 14:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 15:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 16:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 17:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 18:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
                case 19:
                {
                VehicleSpawner(playerid,Sport[ listitem ]);
                }
             }
         }
     }
}
//Station
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Station_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Station[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Station[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Station[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Station[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Station[ listitem ]);
                }
             }
         }
     }
}
//Boats
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Boats_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Boats[ listitem ]);
                }
             }
         }
     }
}
//Trailers
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Trailers_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Trailers[ listitem ]);
                }
             }
         }
     }
}
//Unique
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Unique_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 6:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 7:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 8:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 9:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 10:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 11:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 13:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 14:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 15:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 16:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 17:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 18:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 19:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 20:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 21:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 22:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
                case 23:
                {
                VehicleSpawner(playerid,Unique[ listitem ]);
                }
             }
         }
     }
}
//RC vehicles
if(response)
    {
    switch(dialogid)
        {
        case Dialog_Rc_Vehicle:
            {
            switch(listitem)
            {
                case 0:
                {
                VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
                }
                case 1:
                {
                VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
                }
                case 2:
                {
                VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
                }
                case 3:
                {
                VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
                }
                case 4:
                {
                VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
                }
                case 5:
                {
                VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
                }
             }
         }
     }
}
/*
if(dialogid== Dialog_Rc_Vehicle){
if ( response ){
VehicleSpawner(playerid,RC_Vehicles[ listitem ]);
}else ShowVehicleDialog(playerid);
}*/

return 0;
}

stock ShowVehicleDialog(playerid)
{
ShowPlayerDialog(playerid, Dialog_Vehicle, 2, "{ffffff}Vehicle categories:", "Airplanes\nHelicopters\nBikes\nConvertibles\nIndustrial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons\nBoats\nTrailers\nUnique Vehicles\nRC Vehicles", "Select", "Back" );
}

public VehicleSpawner(playerid,model){
    if(IsPlayerInAnyVehicle(playerid)){
        SendClientMessage(playerid, COLOR_RED, "Error: You're already in vehicle!");
    }
    else{
    if(VehicleSpawn[playerid]==0){
    new Float:x,Float:y,Float:z,Float:a, vehicleid;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,a);
    vehicleid = CreateVehicle(model,x+1,y+1,z,a,-1,-1,-1);
    PutPlayerInVehicle(playerid, vehicleid, 0);
    SetVehicleHealth(vehicleid,  1000.0);
    LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));
    for(new i=0;i<MAX_PLAYERVEHICLES;i++){
    if(Turn[playerid]==MAX_PLAYERVEHICLES){
    VehicleDeleter(PlayerVehicle[playerid][0]);
    new b=MAX_PLAYERVEHICLES-1;
    for(new c=0;c<b;c++){
    new A=c+1;
    PlayerVehicle[playerid][c]=PlayerVehicle[playerid][A];
    }
    PlayerVehicle[playerid][b]=0;
    Turn[playerid]--;
    }
    if(!PlayerVehicle[playerid][i]){
    PlayerVehicle[playerid][i]=vehicleid;
    Turn[playerid]++;
    break;
    }
  }
}
        else{
            new string[256];
            format(string, sizeof(string), "Please wait %d sec. to spawn again a vehicle!", VehicleSpawn[playerid]);
            SendClientMessage(playerid,COLOR_RED, string);
        }
    }
}
public VehicleDeleter(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++){
        new Float:X,Float:Y,Float:Z;
        if(IsPlayerInVehicle(i, vehicleid)){
            RemovePlayerFromVehicle(i);
            GetPlayerPos(i,X,Y,Z);
            SetPlayerPos(i,X,Y+3,Z);
        }
        SetVehicleParamsForPlayer(vehicleid,i,0,1);
    }
    SetTimerEx("VehicleReseter",2000,0,"i",vehicleid);
}

public VehicleReseter(vehicleid)
{
    DestroyVehicle(vehicleid);
}

public VehicleSpawnerLimiter(){
    new i;
    for(i=0;i<=MAX_PLAYERS;i++){
        if(VehicleSpawn[i]>0){
            VehicleSpawn[i]--;
        }
    }
}
public OnVehicleSpawn(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        for(new u=0;u<MAX_PLAYERVEHICLES;u++)
        {
            if(vehicleid==PlayerVehicle[i][u])
            {
                VehicleDeleter(vehicleid);
                PlayerVehicle[i][u]=0;
                Turn[i]--;
            }
        }
    }
    return 0;
}
the second script

pawn Код:
// INCLUDES //
#include <a_samp>


// COLORS //
#define COLOR_BASIC 0x0066FFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA


/////////// Weapon prices ////////////

// INSTRUCTIONS :
// Change the 0 to the amount you want the weapon to be sold
// V = Weapon Price
// A = Weapon amount on buy

// Melee Weapons
  #define VBrassKnuckles 2000
  #define ABrassKnuckles 0
  #define VGolfclub 2500
  #define AGolfclub 0
  #define VNiteStick 2500
  #define ANiteStick 0
  #define VKnife 4000
  #define AKnife 0
  #define VBaseballBat 2500
  #define ABaseballBat 0
  #define VShovel 3000
  #define AShovel 0
  #define VPoolCue 3000
  #define APoolCue 0
  #define VKatana 9000
  #define AKatana 0
  #define VChainsaw 10000
  #define AChainsaw 0
  #define VPurpleDildo 2000
  #define APurpleDildo 0
  #define VSmallWhiteVibrator 2000
  #define ASmallWhiteVibrator 0
  #define VLargeWhiteVibrator 2000
  #define ALargeWhiteVibrator 0
  #define VSilverVibrator 2000
  #define ASilverVibrator 0
  #define VFlower 2500
  #define AFlower 0
  #define VCane 2000
  #define ACane 0

// Thrown Weapons
  #define VGrenade 15000
  #define AGrenade 10
  #define VTearGas 10000
  #define ATearGas 10
  #define VMolotovCocktail 20000
  #define AMolotovCocktail 15

// Pistols
  #define V9mm 5000
  #define A9mm 100
  #define VSilenced9mm 6000
  #define ASilenced9mm 150
  #define VDesertEagle 30000
  #define ADesertEagle 150

// Shotguns
  #define VShotgun 5000
  #define AShotgun 15
  #define VSawn-offShotgun 30000
  #define ASawn-offShotgun 50
  #define VCombatShotgun 20000
  #define ACombatShotgun 100

// SMG's
  #define VSMG 9000
  #define ASMG 200
  #define VUZI 9000
  #define AUZI 200
  #define VTec-9 9000
  #define ATec-9 100

// Rifles
  #define VAK-47 15000
  #define AAK-47 80
  #define VM4 50000
  #define AM4 250
  #define VCountryRifle 10000
  #define ACountryRifle 100
  #define VSniperRifle 60000
  #define ASniperRifle 30

// Special
  #define VRocketLauncher 100000
  #define ARocketLauncher 15
  #define VHeatSeekingRocketLauncher 1000000
  #define AHeatSeekingRocketLauncher 50
  #define VFlamethrower 9000
  #define AFlamethrower 500
  #define VMini-gun 1000000
  #define AMini-gun 300
  #define VSatchelChargeandDetonator 20000
  #define ASatchelChargeandDetonator 20

// Extras
  #define VSprayCan 2000
  #define ASprayCan 200
  #define VFireExtinguisher 2000
  #define AFireExtinguisher 200
  #define VCamera 100
  #define ACamera 500
  #define VNightvision******s 1000
  #define ANightvision******s 500
  #define VThermal******s 0
  #define AThermal******s 0
  #define VParachute 0
  #define AParachute 0

// Health and Armour
  #define VHealth 15000
  #define VArmour 20000
  #define VHealthandArmour 35000


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/w", cmdtext, true, 11) == 0)
{
ShowPlayerDialog(playerid, 20320, DIALOG_STYLE_LIST, "Weapon Shop", "Melee weapons\nThrown\nPistols\nShotguns\nSMG's\nRifles\nSpecials\nExtras\nHealth and Armour", "Select", "Exit");
return 1;
}

return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 20320 && response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 20321, DIALOG_STYLE_LIST, "Weapon Shop [Melee Weapons]", "Brass Knuckles   $2000\nGolf Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nPurple Dildo\nSmall White Vibrator\nLarge White Vibrator\nSilver Vibrator\nFlowers\nCane", "Buy", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 20322, DIALOG_STYLE_LIST, "Weapon Shop [Thrown]", "Grenade\nTear Gas\nMolotov Cocktails", "Buy", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 20323, DIALOG_STYLE_LIST, "Weapon Shop [Pistols]", "9mm\nSilenced 9mm\nDesert Eagle", "Buy", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 20324, DIALOG_STYLE_LIST, "Weapon Shop [Shotguns]", "Shotgun\nSawn-off Shotgun\nCombat Shotgun", "Buy", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 20325, DIALOG_STYLE_LIST, "Weapon Shop [SMG]", "SMG\nUZI\nTec-9", "Buy", "Cancel");
}
case 5:
{
ShowPlayerDialog(playerid, 20326, DIALOG_STYLE_LIST, "Weapon Shop [Rifles]", "AK-47\nM4\nCountry Rifle\nSniper Rifle", "Buy", "Cancel");
}
case 6:
{
ShowPlayerDialog(playerid, 20327, DIALOG_STYLE_LIST, "Weapon Shop [Specials]", "Rocket Launcher\nHeat Seeking Rocket Launcher\nFlamethrower\nMini-gun\nSatchel Charge Kit", "Buy", "Cancel");
}
case 7:
{
ShowPlayerDialog(playerid, 20328, DIALOG_STYLE_LIST, "Weapon Shop [Extras]", "Spray Can\nFire Extinguisher\nCamera\nNightvision ******s\nThermal ******s\nParachute", "Buy", "Cancel");
}
case 8:
{
ShowPlayerDialog(playerid, 20329, DIALOG_STYLE_LIST, "Weapon Shop [Health and Armour]", "Health\nArmour\nHealth and Armour", "Buy", "Cancel");
}
}
}

if(dialogid == 20321 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VBrassKnuckles) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -VBrassKnuckles);
GivePlayerWeapon(playerid, 1, ABrassKnuckles);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Brass Knuckle!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VGolfclub) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Golf Club!");
GivePlayerMoney(playerid, -VGolfclub);
GivePlayerWeapon(playerid, 2, AGolfclub);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Golf Club!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VNiteStick) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Nite Stick!");
GivePlayerMoney(playerid, -VNiteStick);
GivePlayerWeapon(playerid, 3, ANiteStick);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Nite Stick!");
}
case 3:
{
if( GetPlayerMoney(playerid)  <  VKnife) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Knife!");
GivePlayerMoney(playerid, -VKnife);
GivePlayerWeapon(playerid, 4, AKnife);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Knife!");
}
case 4:
{
if( GetPlayerMoney(playerid)  <  VBaseballBat) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Baseball bat!");
GivePlayerMoney(playerid, -VBaseballBat);
GivePlayerWeapon(playerid, 5, ABaseballBat);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Baseball Bat!");
}
case 5:
{
if( GetPlayerMoney(playerid)  <  VShovel) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Shovel!");
GivePlayerMoney(playerid, -VShovel);
GivePlayerWeapon(playerid, 6, AShovel);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Shovel!");
}
case 6:
{
if( GetPlayerMoney(playerid)  <  VPoolCue) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Pool Cue!");
GivePlayerMoney(playerid, -VPoolCue);
GivePlayerWeapon(playerid, 7, APoolCue);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Pool Cue!");
}
case 7:
{
if( GetPlayerMoney(playerid)  <  VKatana) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Katana!");
GivePlayerMoney(playerid, -VKatana);
GivePlayerWeapon(playerid, 8, AKatana);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Katana!");
}
case 8:
{
if( GetPlayerMoney(playerid)  <  VChainsaw) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Chainsaw!");
GivePlayerMoney(playerid, -VChainsaw);
GivePlayerWeapon(playerid, 9, AChainsaw);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Chainsaw!");
}
case 9:
{
if( GetPlayerMoney(playerid)  <  VPurpleDildo) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Purple Dildo!");
GivePlayerMoney(playerid, -VPurpleDildo);
GivePlayerWeapon(playerid, 10, APurpleDildo);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Purple Dildo!");
}
case 10:
{
if( GetPlayerMoney(playerid)  <  VSmallWhiteVibrator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Small White Vibrator!");
GivePlayerMoney(playerid, -VSmallWhiteVibrator);
GivePlayerWeapon(playerid, 11, ASmallWhiteVibrator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Small White Vibrator!");
}
case 11:
{
if( GetPlayerMoney(playerid)  <  VLargeWhiteVibrator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Large White Vibrator!");
GivePlayerMoney(playerid, -VLargeWhiteVibrator);
GivePlayerWeapon(playerid, 12, ALargeWhiteVibrator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Large White Vibrator!");
}
case 12:
{
if( GetPlayerMoney(playerid)  <  VSilverVibrator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Silver Vibrator!");
GivePlayerMoney(playerid, -VSilverVibrator);
GivePlayerWeapon(playerid, 13, ASilverVibrator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Silver Vibrator!");
}
case 13:
{
if( GetPlayerMoney(playerid)  <  VFlower) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy some Flowers!");
GivePlayerMoney(playerid, -VFlower);
GivePlayerWeapon(playerid, 14, AFlower);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought some Flowers!");
}
case 14:
{
if( GetPlayerMoney(playerid)  <  VCane) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Cane!");
GivePlayerMoney(playerid, -VCane);
GivePlayerWeapon(playerid, 15, ACane);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Cane!");
}
}
}

if(dialogid == 20322 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VGrenade) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Grenade!");
GivePlayerMoney(playerid, -VGrenade);
GivePlayerWeapon(playerid, 16, AGrenade);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Grenade!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VTearGas) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Tear Gas!");
GivePlayerMoney(playerid, -VTearGas);
GivePlayerWeapon(playerid, 17, ATearGas);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Tear Gas!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VMolotovCocktail) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Molotov Cocktail!");
GivePlayerMoney(playerid, -VMolotovCocktail);
GivePlayerWeapon(playerid, 18, AMolotovCocktail);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Molotov Cocktail!");
}
}
}

if(dialogid == 20323 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  V9mm) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a 9mm!");
GivePlayerMoney(playerid, -V9mm);
GivePlayerWeapon(playerid, 22, A9mm);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a 9mm!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VSilenced9mm) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Silenced 9mm!");
GivePlayerMoney(playerid, -VSilenced9mm);
GivePlayerWeapon(playerid, 23, ASilenced9mm);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Silenced 9mm!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VDesertEagle) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Desert Eagle!");
GivePlayerMoney(playerid, -VDesertEagle);
GivePlayerWeapon(playerid, 24, ADesertEagle);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Desert Eagle!");
}
}
}
if(dialogid == 20324 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VShotgun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Shotgun!");
GivePlayerMoney(playerid, -VShotgun);
GivePlayerWeapon(playerid, 25, AShotgun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Shotgun!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VSawn-offShotgun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Sawn-off Shotgun!");
GivePlayerMoney(playerid, -VSawn-offShotgun);
GivePlayerWeapon(playerid, 26, ASawn-offShotgun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Sawn-off Shotgun!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VCombatShotgun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Combat Shotgun!");
GivePlayerMoney(playerid, -VCombatShotgun);
GivePlayerWeapon(playerid, 27, ACombatShotgun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Combat Shotgun!");
}
}
}
if(dialogid == 20325 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VSMG) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a SMG!");
GivePlayerMoney(playerid, -VSMG);
GivePlayerWeapon(playerid, 29, ASMG);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a SMG!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VUZI) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a UZI!");
GivePlayerMoney(playerid, -VUZI);
GivePlayerWeapon(playerid, 28, AUZI);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a UZI!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VTec-9) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Tec-9!");
GivePlayerMoney(playerid, -VTec-9);
GivePlayerWeapon(playerid, 32, ATec-9);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Tec-9!");
}
}
}
if(dialogid == 20326 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VAK-47) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy an AK-47!");
GivePlayerMoney(playerid, -VAK-47);
GivePlayerWeapon(playerid, 30, AAK-47);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought an AK-47!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VM4) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a M4!");
GivePlayerMoney(playerid, -VM4);
GivePlayerWeapon(playerid, 31, AM4);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a M4!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VCountryRifle) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Country Rifle!");
GivePlayerMoney(playerid, -VCountryRifle);
GivePlayerWeapon(playerid, 33, ACountryRifle);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Country Rifle!");
}
case 3:
{
if( GetPlayerMoney(playerid)  <  VSniperRifle) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Country Rifle!");
GivePlayerMoney(playerid, -VSniperRifle);
GivePlayerWeapon(playerid, 34, ASniperRifle);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Country Rifle!");
}
}
}
if(dialogid == 20327 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VRocketLauncher) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Rocket Launcher!");
GivePlayerMoney(playerid, -VRocketLauncher);
GivePlayerWeapon(playerid, 35, ARocketLauncher);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Rocket Laucher!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VHeatSeekingRocketLauncher) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Heat Seeking Rocket Launcher!");
GivePlayerMoney(playerid, -VHeatSeekingRocketLauncher);
GivePlayerWeapon(playerid, 36, AHeatSeekingRocketLauncher);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Heat Seeking Rocket Launcher!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VFlamethrower) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Flamethrower!");
GivePlayerMoney(playerid, -VFlamethrower);
GivePlayerWeapon(playerid, 37, AFlamethrower);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Country Flamethrower!");
}
case 3:
{
if( GetPlayerMoney(playerid)  <  VMini-gun) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Mini-gun!");
GivePlayerMoney(playerid, -VMini-gun);
GivePlayerWeapon(playerid, 38, AMini-gun);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Mini-gun!");
}
case 4:
{
if( GetPlayerMoney(playerid)  <  VSatchelChargeandDetonator) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Satchel Charge Kit!");
GivePlayerMoney(playerid, -VSatchelChargeandDetonator);
GivePlayerWeapon(playerid, 39, ASatchelChargeandDetonator);
GivePlayerWeapon(playerid, 40, ASatchelChargeandDetonator);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Satchel Charge Kit!");
}
}
}
if(dialogid == 20328 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VSprayCan) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Spray Can!");
GivePlayerMoney(playerid, -VSprayCan);
GivePlayerWeapon(playerid, 41, ASprayCan);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Spray Can!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VFireExtinguisher) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Extinguisher!");
GivePlayerMoney(playerid, -VFireExtinguisher);
GivePlayerWeapon(playerid, 42, AFireExtinguisher);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Fire Extinguisher!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VCamera) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Camera!");
GivePlayerMoney(playerid, -VCamera);
GivePlayerWeapon(playerid, 43, ACamera);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Camera!");
}
case 3:
{
if( GetPlayerMoney(playerid)  <  VNightvision******s) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Nightvision ******!");
GivePlayerMoney(playerid, -VNightvision******s);
GivePlayerWeapon(playerid, 44, ANightvision******s);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Nightvision ******!");
}
case 4:
{
if( GetPlayerMoney(playerid)  <  VThermal******s) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Thermal ******!");
GivePlayerMoney(playerid, -VThermal******s);
GivePlayerWeapon(playerid, 45, AThermal******s);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Thermal ******!");
}
case 5:
{
if( GetPlayerMoney(playerid)  <  VParachute) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Parachute!");
GivePlayerMoney(playerid, -VParachute);
GivePlayerWeapon(playerid, 46, AParachute);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought a Parachute!");
}
}
}

if(dialogid == 20329 && response)
{
switch(listitem)
{
case 0:
{
if( GetPlayerMoney(playerid)  <  VHealth) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Brass Knuckle!");
GivePlayerMoney(playerid, -VHealth);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully refilled your Health Bar!");
}
case 1:
{
if( GetPlayerMoney(playerid)  <  VArmour) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Golf Club!");
GivePlayerMoney(playerid, -VArmour);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully bought an Armour!");
}
case 2:
{
if( GetPlayerMoney(playerid)  <  VHealthandArmour) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money to buy a Nite Stick!");
GivePlayerMoney(playerid, -VHealthandArmour);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREEN, "WEAPON SHOP : You have succesfully refilled your Health Bar and bought an Armour!");
}
}
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)