pls help with this - 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: pls help with this (
/showthread.php?tid=440799)
pls help with this -
RyanPetersons - 31.05.2013
pawn Код:
CMD:robbank(playerid,params[])
{
for (new i=0;i<MAX_PLAYERS;i++)
{
if (PlayerOrg[i] == PlayerOrg[playerid]/* && i != playerid*/) // Remove the identification when you'll not try alone anymore.
{
SendClientMessageToAll(COLOR_RED,"BREAKING NEWS: The San Andreas Bank has been robbed by a Mafia, ALARM ON!");
SendClientMessage(i,COLOR_RED,"Your family has started robbing the bank, Every 5 min(+5000)");
SetPlayerAttachedObject(i, 0, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
Robman[i][rob] = 1;}
}
return 1;
}
No errors, no warning
bug:- It shows like 100 messages in the chat with BREAKING NEWS:The SanAndreas Bank has been robbed by a Mafia, ALARM ON!
Re: pls help with this - HuSs3n - 31.05.2013
pawn Код:
CMD:robbank(playerid,params[])
{
for (new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if (PlayerOrg[i] == PlayerOrg[playerid]/* && i != playerid*/) // Remove the identification when you'll not try alone anymore.
{
SendClientMessage(i,COLOR_RED,"Your family has started robbing the bank, Every 5 min(+5000)");
SetPlayerAttachedObject(i, 0, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
Robman[i][rob] = 1;
}
}
}
SendClientMessageToAll(COLOR_RED,"BREAKING NEWS: The San Andreas Bank has been robbed by a Mafia, ALARM ON!");
return 1;
}
Re: pls help with this -
RyanPetersons - 31.05.2013
bump srry.
Re: pls help with this -
BossZk - 31.05.2013
Try this and see if it still sends lots of messages
pawn Код:
CMD:robbank(playerid,params[])
{
if (PlayerOrg[playerid])/* && i != playerid*/) // Remove the identification when you'll not try alone anymore.
{
SendClientMessageToAll(COLOR_RED,"BREAKING NEWS: The San Andreas Bank has been robbed by a Mafia, ALARM ON!");
SendClientMessage(playerid,COLOR_RED,"Your family has started robbing the bank, Every 5 min(+5000)");
SetPlayerAttachedObject(playerid, 0, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
Robman[playerid][rob] = 1;
}
return 1;
}