SendClientMessage problem.
#1

Hi!

I've got a little problem with SendClientMessage.
I want it to send one message, but it sends like a hundred or so.

Here's the code:
pawn Код:
if(vhealth < 350 && FrozenVeh[vehid] == 0)
            {
                GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vehid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                gCar[vehid][Engine] = 0;
                SendClientMessage(i, COLOR_GREEN, "Yout engine went down. You'll need to call a mechanic. (( /call ))");
            }
Reply
#2

Seems that you are adding it inside a loop so add it OUTSIDE of the loop.
Reply
#3

if(vhealth < 350 && FrozenVeh[vehid] == 0 && gCar[vehid][Engine] == 1)

??
Reply
#4

Thanks, cosbraa.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)