29.01.2014, 20:09
Is it not working? Well, first the code above is missing return's. Also, there is a better (working) way of defining the vehicle.
Try this:
Try this:
pawn Код:
//Include at the top of your script (with all the other defined variables)
new Hotwire1[1];//The 1 represents the number of vehicles within Hotwire1, each will have it's own ID attached with Hotwire1.
public OnGameModeInit()
{
Hotwire1[0] = AddStaticVehicleEx(549, 1669.7079, 1286.9500, 10.5176, 359.8699, 75, 39);//Yeah, 0 is a number here, but not when we defined it... kind of confusing.
//Rest of OnGameModeInit code...
return 1;
}
command(hotwire, playerid, params[])
{
if(GetPlayerVehicleID(playerid) == Hotwire1[0])
{
SetTimerEx("Hotwiring", 2000, false, "i", playerid);
GameTextForPlayer(playerid, "~r~Hotwiring", 5000, 1);
return 1;
}
}
//Timers just like you have them above, BUT YOU NEED RETURNS! (return 1; at the end of everything).