11.08.2017, 04:43
PHP код:
new NitroxInfinito[MAX_PLAYERS];
CMD:nitroinfinito(playerid)
{
NitroxInfinito[playerid] = 1;
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(newkeys & KEY_CROUCH)//CTRL
{
if(NitroxInfinito[playerid] == 1)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);//nitrox
}
}
}
return 1;
}
Quote:
NitroxInfinito[playerid]=0; |