[+REP] "for" function problem
#1

Hello, I've scripted a command to buy a house, I made it currently to send you a message contains the id of the house checkpoint that you are in, but if I use the command while not in a checkpoint, it spams sending me message"word_system"0.... tons of times.

Код:
CMD:h(playerid, params[])
{
	new selection[10];
	if(sscanf(params, "s[20]", selection)) return SendUsageMSG(playerid, "/h [BUY/SELL/CONFIG]");

	if(!strcmp(selection, "buy", true))
	{
	    for(new i = 0; i < MAX_HOUSES; i++)
	    {
	        if(IsPlayerInDynamicCP(playerid, hInfo[i][EntranceCP]))
	        {
	            if(hInfo[i][hOwned] == 0)
	            {
					new string[128];
					format(string, sizeof(string), ""WORD_SYSTEM"%d", hInfo[i][hID]);
					SCM(playerid, COLOR_WHITE, string);
					SetHouseOwner(i, PlayerName(playerid));
				}
			}
		}
	}
	return 1;
}
EDITED
Reply


Messages In This Thread
[+REP] "for" function problem - by E7mad - 05.02.2016, 11:27
Re: [+REP] "for" function problem - by Riddick94 - 05.02.2016, 11:31
Re: [+REP] "for" function problem - by E7mad - 05.02.2016, 11:36
Re: [+REP] "for" function problem - by E7mad - 05.02.2016, 16:12
Re: [+REP] "for" function problem - by Mencent - 05.02.2016, 16:29
Re: [+REP] "for" function problem - by E7mad - 05.02.2016, 16:42
Re: [+REP] "for" function problem - by E7mad - 05.02.2016, 16:46
Re: [+REP] "for" function problem - by -CaRRoT - 05.02.2016, 16:58
Re: [+REP] "for" function problem - by E7mad - 05.02.2016, 17:01
Re: [+REP] "for" function problem - by E7mad - 05.02.2016, 17:09

Forum Jump:


Users browsing this thread: 1 Guest(s)