02.02.2013, 16:14
Hey Guys,
I created this script:
The script suppost to start the engine when the player press LMB and it should randomly choose if the engine start or not,but when I press LMB(fire key) nothing happened.
Help guys,tnx ))
I created this script:
pawn Код:
if(newkeys == KEY_FIRE)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
switch(randaa)
{
case Suc:
{
TogglePlayerControllable(playerid, 1);
engineOn[vehicle] = 1;
SendClientMessage(playerid, COLOR_RED, "The engine started normaly.");
}
case Fail:
{
engineOn[vehicle] = 0;
SendClientMessage(playerid, COLOR_RED, "The engine didn't start,try again.");
}
}
}
return 1;
}
Help guys,tnx ))