SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 04/02/2015, 02:26 AM   #1
Metharon
Huge Clucker
 
Metharon's Avatar
 
Join Date: Apr 2014
Location: England
Posts: 340
Reputation: 34
Default Something wrong about models of vehicle?

Ok well this is my dealership i'm working on .

On the frist model , yeah is working but after that no.. and i don't know what's the problem it should work
Look what's happen :




My code:

// on entrance on ds
pawn Code:
dshopid[playerid] = 1;
            VehicleDS(playerid);





pawn Code:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == DealershipGLOBAL0) // >>
    {
            if(dshopid[playerid] == 54) return 1;
            dshopid[playerid] += 1;
            DestroyVehicle(DealershipCar[playerid]);
            VehicleDS(playerid);
    }
    if(clickedid == DealershipGLOBAL1) // <<
    {
            if(dshopid[playerid] == 1) return 1;
            dshopid[playerid] -= 1;
            DestroyVehicle(DealershipCar[playerid]);
            VehicleDS(playerid);
    }
    return 1;
}

pawn Code:
Function VehicleDS(playerid)
{
    new model;
    if(dshopid[playerid] == 1) { model = 466; }
    if(dshopid[playerid] == 2) { model = 467; }
    if(dshopid[playerid] == 3) { model = 492; }
    if(dshopid[playerid] == 4) { model = 401; }
    if(dshopid[playerid] == 5) { model = 404; }
    if(dshopid[playerid] == 6) { model = 405; }
    if(dshopid[playerid] == 7) { model = 410; }
    if(dshopid[playerid] == 8) { model = 412; }
    if(dshopid[playerid] == 9) { model = 419; }
    if(dshopid[playerid] == 10) { model = 421; }
    if(dshopid[playerid] == 11) { model = 422; }
    if(dshopid[playerid] == 12) { model = 426; }
    if(dshopid[playerid] == 13) { model = 436; }
    if(dshopid[playerid] == 14) { model = 439; }
    if(dshopid[playerid] == 15) { model = 458; }
    if(dshopid[playerid] == 16) { model = 518; }
    if(dshopid[playerid] == 17) { model = 526; }
    if(dshopid[playerid] == 18) { model = 527; }
    if(dshopid[playerid] == 19) { model = 533; }
    if(dshopid[playerid] == 20) { model = 534; }
    if(dshopid[playerid] == 21) { model = 565; }
    if(dshopid[playerid] == 22) { model = 542; }
    if(dshopid[playerid] == 23) { model = 546; }
    if(dshopid[playerid] == 24) { model = 547; }
    if(dshopid[playerid] == 25) { model = 566; }
    if(dshopid[playerid] == 26) { model = 567; }
    if(dshopid[playerid] == 27) { model = 585; }
    if(dshopid[playerid] == 28) { model = 400; }
    if(dshopid[playerid] == 29) { model = 402; }
    if(dshopid[playerid] == 30) { model = 411; }
    if(dshopid[playerid] == 31) { model = 415; }
    if(dshopid[playerid] == 32) { model = 429; }
    if(dshopid[playerid] == 33) { model = 434; }
    if(dshopid[playerid] == 34) { model = 451; }
    if(dshopid[playerid] == 35) { model = 506; }
    if(dshopid[playerid] == 36) { model = 535; }
    if(dshopid[playerid] == 37) { model = 541; }
    if(dshopid[playerid] == 38) { model = 550; }
    if(dshopid[playerid] == 39) { model = 558; }
    if(dshopid[playerid] == 40) { model = 587; }
    if(dshopid[playerid] == 41) { model = 589; }
    if(dshopid[playerid] == 42) { model = 559; }
    if(dshopid[playerid] == 43) { model = 602; }
    if(dshopid[playerid] == 44) { model = 603; }
    if(dshopid[playerid] == 45) { model = 560; }
    if(dshopid[playerid] == 46) { model = 562; }
    if(dshopid[playerid] == 47) { model = 579; }
    if(dshopid[playerid] == 48) { model = 462; }
    if(dshopid[playerid] == 49) { model = 581; }
    if(dshopid[playerid] == 50) { model = 522; }
    if(dshopid[playerid] == 51) { model = 461; }
    if(dshopid[playerid] == 52) { model = 521; }
    if(dshopid[playerid] == 53) { model = 463; }
    if(dshopid[playerid] == 54) { model = 468; }
    DealershipCar[playerid] = CreateVehicle(model, 1780.2039, -1743.6418, 13.1554, 67.1978, -1, -1, 100); //masina ds
    new string[456];
    format(string, sizeof(string), "%s",VehicleNames[GetVehicleModel(DealershipCar[playerid])-400]);
    PlayerTextDrawSetString(playerid, DealershipPLA[playerid], string);
    return 1;
}


And the order:

// the vehicleds function
// the onplayerclick


i don't want somebody to say "you call the function before it wasn't created

So , where's the "BUG" ?
__________________
#Mad
Metharon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number of vehicle models: 0? Samieastwood Scripting Help 3 24/11/2014 09:43 PM
Number of vehicle models: 0 SkL_MD Scripting Help 5 21/06/2012 01:48 PM
Need help with specific vehicle models milanosie Scripting Help 3 20/12/2011 11:47 AM
Vehicle models.. GaGlets(R) Client Support 3 02/05/2011 06:22 PM
[FilterScript] [FS] tAxI's Vehicle Streamer [v0.2] - add unlimited vehicle spawns and models!!! cptnsausage Filterscripts 205 31/07/2010 05:29 AM


All times are GMT. The time now is 09:20 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.