SA-MP Forums Archive
/tune need help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /tune need help (/showthread.php?tid=185593)



/tune need help - Mr.Jvxmc - 25.10.2010

// CODE
Код:
    if(strcmp(cmdtext, "/tune", true) == 0)
    {
    new vehicleid;
    model = GetVehicleModel(vehicleid); // Store the model ID of the vehicle
    vehicleid = GetPlayerVehicleID(playerid);
    AddVehicleComponent(vehicleid, 1074); // Switch ratlankiai
    AddVehicleComponent(vehicleid, 1087); // Hydraulics
    AddVehicleComponent(vehicleid, 1010); // Hydraulics
    new newtext[256];
    format(newtext, sizeof(newtext), "You just pimped your ~y~%s~y~", aVehicleNames[model-400]);
    TextDrawSetString(TextdrawText, newtext);
    TextDrawShowForPlayer(playerid, TextdrawText);
    SetTimer("TextdrawTextRemove", 2000, false);
    return 1;
    }
but say 2 errors
Код:
C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(3001) : error 017: undefined symbol "model"
C:\Documents and Settings\Meie Kodu\Desktop\Minu GM\gamemodes\LV-SE.pwn(3007) : error 017: undefined symbol "model"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
need help plz


Re: /tune need help - Bogdanovic - 25.10.2010

Try this...

if(strcmp(cmdtext, "/tune", true) == 0)
{
new vehicleid, model;
model = GetVehicleModel(vehicleid); // Store the model ID of the vehicle
vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1074); // Switch ratlankiai
AddVehicleComponent(vehicleid, 1087); // Hydraulics
AddVehicleComponent(vehicleid, 1010); // Hydraulics
new newtext[256];
format(newtext, sizeof(newtext), "You just pimped your ~y~%s~y~", aVehicleNames[model-400]);
TextDrawSetString(TextdrawText, newtext);
TextDrawShowForPlayer(playerid, TextdrawText);
SetTimer("TextdrawTextRemove", 2000, false);
return 1;
}



Re: /tune need help - Mr.Jvxmc - 25.10.2010

Now it's compile, but if i go into game and type /tune then car is pimped, but text deosn't show


Re: /tune need help - Mr.Jvxmc - 25.10.2010

Ah idon't need help, i got fixed xD