hozz létre egy tömböt (
max_players ) és ha 1-en van azt csinálja ha 0-án return 0;
kis logika..
[pawn]new Boost[MAX_PLAYERS];[/pawn]
[pawn]CMD:booston(playerid,params[])
{
Boost[playerid] = 1;
return 1;
}
CMD:boostoff(playerid,params[])
{
Boost[playerid] = 0;
return 1;
}[/pawn]
[pawn]if(PRESSED(KEY_FIRE))
{
if(Boost[playerid] = 1)
{
GetVehicleVelocity(GetPlayerVehicleID(playerid), X, Y, Z);
SetVehicleVelocity(GetPlayerVehicleID(playerid), X * 1.5, Y * 1.5, Z * 1.5);
}
}
[/pawn]