09.08.2011, 21:52
PHP код:
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;
}