SA-MP Forums Archive
SendClientMessage problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SendClientMessage problem. (/showthread.php?tid=385093)



SendClientMessage problem. - tsonn1 - 14.10.2012

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 ))");
            }



Re: SendClientMessage problem. - gtakillerIV - 14.10.2012

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


Re: SendClientMessage problem. - cosbraa - 14.10.2012

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

??


Re: SendClientMessage problem. - tsonn1 - 14.10.2012

Thanks, cosbraa.