22.07.2013, 19:09
Hello,
I create a audible signal system if the seat belt is not fastened for any player in any veh.
I create a Loop Timer on gamemode init with param "i" for select all player doesn't have seat belt fasten but the song only played when the id 0 player don't gave set belt fasten..
My script:
The Timer:
OnGameModeInit:
Public:
Please help me!! Thanks
PS: Sorry for my bad English but i'm Belgian and i post in English because I find that the English community support more than the French community.
I create a audible signal system if the seat belt is not fastened for any player in any veh.
I create a Loop Timer on gamemode init with param "i" for select all player doesn't have seat belt fasten but the song only played when the id 0 player don't gave set belt fasten..
My script:
The Timer:
Код:
forward checkceinturetimer(playerid);
Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
SetTimer("checkceinturetimer", 3000, false);
}
Код:
public checkceinturetimer()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
new carid;
carid = GetPlayerVehicleID(i);
if(GetVehicleModel(carid) != 481 || GetVehicleModel(carid) != 509 || GetVehicleModel(carid) != 510)
{
new pState = GetPlayerState(i);
if(pState == 2 && GetPlayerVehicleSeat(i) == 0)
{
if(!Ceinture[i])
{
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
}
else
{
return 1;
}
return 1;
}
return 1;
}
return 1;
}
return 1;
}

PS: Sorry for my bad English but i'm Belgian and i post in English because I find that the English community support more than the French community.

