public OnGameModeInit()
{
ManualVehicleEngineAndLights();
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
new a[8];
GetVehicleParamsEx(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);
if(a[1] == 0)
{
SendClientMessage(playerid,-1,"Vocк ligou o carro !");
SetVehicleParamsEx(a[0],1,a[2],a[3],a[4],a[5],a[6],a[7]);
}
else
{
SendClientMessage(playerid,-1,"Vocк desligou o carro !");
SetVehicleParamsEx(a[0],0,a[2],a[3],a[4],a[5],a[6],a[7]);
}
}
return 1;
}
new bool:Ligou[MAX_PLAYERS] = false;
public OnGameModeInit()
{
ManualVehicleEngineAndLights();
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
new a[8];
GetVehicleParamsEx(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);
if(Ligou[playerid] == false)
{
SendClientMessage(playerid,-1,"Vocк ligou o carro !");
SetVehicleParamsEx(a[0],1,a[2],a[3],a[4],a[5],a[6],a[7]);
Ligou[playerid] = true;
}
else
{
SendClientMessage(playerid,-1,"Vocк desligou o carro !");
SetVehicleParamsEx(a[0],0,a[2],a[3],a[4],a[5],a[6],a[7]);
Ligou[playerid] = false;
}
}
return 1;
}
new CarroLigo[MAX_PLAYERS};// Comeзo do GM
public OnGameModeInit()
{
ManualVehicleEngineAndLights();
CarroLigo[playerid] == 0;
return 1;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
new a[8];
GetVehicleParamsEx(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);
if(a[1] == 0)
{
if(CarroLigo[playerid] == 0)
{
SendClientMessage(playerid,-1,"Vocк ligou o carro !");
SetVehicleParamsEx(a[0],1,a[2],a[3],a[4],a[5],a[6],a[7]);
CarroLigo[playerid] = 1;
}
}
else
{
if(CarroLigo[playerid] == 1)
{
SendClientMessage(playerid,-1,"Vocк desligou o carro !");
SetVehicleParamsEx(a[0],0,a[2],a[3],a[4],a[5],a[6],a[7]);
CarroLigo[playerid] = 0;
}
}
}
return 1;
}
PHP код:
|