SA-MP Forums Archive
It Keep Spamming - 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: It Keep Spamming (/showthread.php?tid=400546)



It Keep Spamming - Windrush - 19.12.2012

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    for(new 
0MAX_HOUSES;i++)
    {
        if(
pickupid == HouseBuyable[playerid])
        {
            new 
pName[24];
            
GetPlayerName(playerid,pName,24);
            
            if(
HInfo[playerid][Owned] == 0)
            {
                new 
string[128];
                
format(string,sizeof(string),"{FF0000}[System] {00FF00}You Can Buy This House For {FFFF00}$%i, {00FF00}Type \"{FFFF00}/buyh{00FF00}\" To Buy This House",HInfo[i][Price]);
                
SendClientMessage(playerid,-1,string);
            }
        }
        if(
pickupid == HouseUnBuyable[i])
        {
            new 
pName[24];
            
GetPlayerName(playerid,pName,24);
            if(
HInfo[i][Owned] == && strcmp(HInfo[i][Owner],pName) == 0)
            {
                
ShowPlayerDialog(playerid,DIALOG_C-ENTER,DIALOG_STYLE_MSGBOX,"{00FF00}House System","{FF0000}Are You Sure To Enter To Your House?","Yes","No");
            }
            if(
HInfo[i][Owned] == && strcmp(HInfo[i][Owner],pName) != 0)
            {
                
SendClientMessage(playerid,-1,"You don't own this house");
            }
        }
    }
    return 
1;




Re: It Keep Spamming - Windrush - 19.12.2012

anyone?!


Re: It Keep Spamming - Huxley - 19.12.2012

Provide more info please.


Re: It Keep Spamming - Patrick - 19.12.2012

what is spamming?

provide more information please


Re: It Keep Spamming - Windrush - 19.12.2012

whole code
http://pastebin.com/eJwjCDA7


Re: It Keep Spamming - LarzI - 19.12.2012

He's sending messages inside a loop - what do you guys think is spamming?

You've set MAX_HOUSES to 10000. This means that the loop will run 10000 times.

Please explain what you want to happen. What's the point of looping? What is HouseBuyable and HouseUnbuyable supposed to do?


Re: It Keep Spamming - Windrush - 19.12.2012

HouseBuyable = Creating Green Pickup
HouseUnBuyable = creating Blue Pickup


Re: It Keep Spamming - LarzI - 19.12.2012

pawn Код:
if(pickupid == HouseBuyable[playerid])
Then what the hell is this?

Anyway. Try using return or break to stop the loop.


Re: It Keep Spamming - Buzzbomb - 19.12.2012

I get spam messages from formats i just return 1; after SendClientMessage problem solved for me