Command help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command help (
/showthread.php?tid=134040)
Command help -
chriswilson - 14.03.2010
HI im useing this command to respawn all the cars on the server but when i enter the command the sendclient message sends alot of spam to every one >.< how do I make it to where it only says the message once?
Код:
if(strcmp(cmdtext, "/atow", true)==0)
{
if (IsPlayerAdmin(playerid))
for(new v=0; v<MAX_VEHICLES; v++)
{
SetVehicleToRespawn(v);
SendClientMessageToAll(0x90EE90FF, "Public Vehicles have been respawned");
}
return 1;
}
Re: Command help -
Faraday - 14.03.2010
Move the SendClientMessage out of the loop. It'll actually send for every vehicle that's respawned.
Re: Command help -
chriswilson - 14.03.2010
ok fixed it thanks