02.03.2012, 06:53
hai,
I would like if some help me.
I have defined all nicely, no errors, no warnings, but not working. It's supposed to make Nlimit array goes more when nitr is off, and goes down when Nitro is on. I have defined that OnPlayerKeyStateChange. Nitro is supposed to stop when LMB is released, and it do. But, this timer is looking like being ignored. Here's code
I have done this by myself, have not copied from someone or stolen. This is my own work, so I know whta I did, and where errors should be where should not. Timer is defined as: NitroLimit = SetTimer("Nitrolimiter",1000,1);
Every array and vars is defined as it should be.
I would like if some help me.
I have defined all nicely, no errors, no warnings, but not working. It's supposed to make Nlimit array goes more when nitr is off, and goes down when Nitro is on. I have defined that OnPlayerKeyStateChange. Nitro is supposed to stop when LMB is released, and it do. But, this timer is looking like being ignored. Here's code
Код:
forward NitroLimiter(playerid); public NitroLimiter(playerid) { new string[56],component; component = GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_NITRO); for (new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if (IsPlayerInAnyVehicle(i) && (component == 1008 || component == 1009 || component == 1010)) { if (Nlimit[i] > 20) Nlimit[i] = 20; if (Usingnitro[i] == 0) Nlimit[i]++,SendClientMessage(playerid,-1,"Nlimit goes more"); else Nlimit[i]--; format(string,sizeof(string),"Nlimit is: %d",Nlimit[i]); SendClientMessage(i ,-1,string); } } } }
Every array and vars is defined as it should be.