10.04.2013, 06:51
Essa nгo й a funзгo. Tenha em mente que essa funзгo que vocк passou (SetVehicleParamsForPlayer) irб alterar os parвmetros somente para 1 jogador, jб a funзгo SetVehicleParamsEx vai alterar para todos os jogadores.
pawn Код:
new
bool: boo_veh_locked [ MAX_VEHICLES ];
YCMD:trancar ( playerid, params [ ], help )
{
if ( !IsPlayerInAnyVehicle ( playerid ) )
return SendClientMessage ( playerid, -1, "Vocк nгo estб em um veнculo." );
new
vehicleid = GetPlayerVehicleID ( playerid );
if ( boo_veh_locked [ vehicleid ] )
return SendClientMessage ( playerid, -1, "Esse veнculo jб estб trancado!" );
new
params [ 7 ];
GetVehicleParamsEx ( vehicleid, params [ 0 ], params [ 1 ], params [ 2 ], params [ 3 ], params [ 4 ], params [ 5 ], params [ 6 ] );
SetVehicleParamsEx ( vehicleid, params [ 0 ], params [ 1 ], params [ 2 ], true, params [ 4 ], params [ 5 ], params [ 6 ] );
boo_veh_locked [ vehicleid ] = true;
return 1;
}
YCMD:destrancar ( playerid, params [ ], help )
{
if ( !IsPlayerInAnyVehicle ( playerid ) )
return SendClientMessage ( playerid, -1, "Vocк nгo estб em um veнculo." );
new
vehicleid = GetPlayerVehicleID ( playerid );
if ( !boo_veh_locked [ vehicleid ] )
return SendClientMessage ( playerid, -1, "Esse veнculo jб estб destrancado!" );
new
params [ 7 ];
GetVehicleParamsEx ( vehicleid, params [ 0 ], params [ 1 ], params [ 2 ], params [ 3 ], params [ 4 ], params [ 5 ], params [ 6 ] );
SetVehicleParamsEx ( vehicleid, params [ 0 ], params [ 1 ], params [ 2 ], false, params [ 4 ], params [ 5 ], params [ 6 ] );
boo_veh_locked [ vehicleid ] = false;
return 1;
}