SA-MP Forums Archive
Auto tune :D - 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: Auto tune :D (/showthread.php?tid=176818)



Auto tune :D - FireCat - 14.09.2010

well i was updating this command help me
i tryed to put if he is in any car cause if he wasnt i think it would crash but i get this warning why
code:
Код:
if(strcmp(cmdtext, "/autotune", true) == 0)
    {
    new VehicleID;
    VehicleID = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid)== 1)
    GameTextForPlayer(playerid,"~b~Car modded!", 4000, 5);
    AddVehicleComponent(VehicleID, 1087); //hidraulic
    AddVehicleComponent(VehicleID, 1078); // wheels
    AddVehicleComponent(VehicleID, 1010); //nos 10x
    AddVehicleComponent(VehicleID, 1003); //spoiler
    AddVehicleComponent(VehicleID, 1018); //exaust
    }else{ return SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle");
    return 1; // warning line
    }
warning:
Код:
C:\Users\james\Desktop\Stunt Evo2 - Servera\gamemodes\SE.pwn(1111) : warning 225: unreachable code
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase
1 Warning.
help me please


Re: Auto tune - Virtual1ty - 14.09.2010

pawn Код:
if(strcmp(cmdtext, "/autotune", true) == 0)
{
    new VehicleID;
    VehicleID = GetPlayerVehicleID(playerid);
   
    if(IsPlayerInAnyVehicle(playerid)== 1)
    {
        GameTextForPlayer(playerid,"~b~Car modded!", 4000, 5);
        AddVehicleComponent(VehicleID, 1087); //hidraulic
        AddVehicleComponent(VehicleID, 1078); // wheels
        AddVehicleComponent(VehicleID, 1010); //nos 10x
        AddVehicleComponent(VehicleID, 1003); //spoiler
        AddVehicleComponent(VehicleID, 1018); //exaust
    }
    else
        SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle");
    return 1;
}
You had 1 missing bracket, and one not needed return expression.


Re: Auto tune :D - FireCat - 14.09.2010

ok... i see but it worked thanks