Signcheck Problem.
#1

Hey, it's me "Again", :P, I'm having a problem with my /signcheck [number]. So at payday you get a textdraw at the side saying "Payday: [Number] and it shows a random number, so I goto the post office and /signcheck that number and of course I get the check, but then if I enter a different number then what it shows on the Textdraw at the side it still gives me the check. Here's my code.

Код:
CMD:signcheck(playerid, params[])
{
    new randcn = 10000 + random(999999);
    if(sscanf(params, "d", randcn)) return SendClientMessage(playerid, -1, "USAGE: /signcheck [number]");
    {
	if(CheckReady[playerid] == 1)
	{
 	    if(IsPlayerInRangeOfPoint(playerid, 4.0, 915.9413,2370.7383,246.4621))
   	    {
                 PayDayCheck(playerid);
       		 CheckReady[playerid] = 0;
	    }
	    else return SendClientMessage(playerid, COLOR_WHITE, "You have entered an invalid check number!");
        }
	else return SendClientMessage(playerid, COLOR_WHITE, "Your check isn't ready to be collected.");
    }
    return 1;
}
Код:
public ClockUpdate()
{
	for(new x = 0; x < MAX_PLAYERS; x++)
	{
		if(Logged[x] == 1)
		{
			new string[12];
			new string1[12];
   			new randcn = 10000 + random(999999);
			Second += 1;
			format(string, sizeof(string), "%i:%i:%i", Hour, Minute, Second);
			if(Second == 60)
			{
			    if(Minute == 59)
				{
				    for(new i = 0; i < MAX_PLAYERS; i++)
				    {
				        if(IsPlayerConnected(i))
				        {
				    		SendClientMessage(i, COLOR_ORANGE, "Payday! Your check has arrived, head to the post office in Fort Carson!.");
						    CheckReady[i] = 1;
						    format(string1,sizeof (string1),"Payday: %d", randcn);
							TextDrawSetString(Payday, string1);
							TextDrawShowForAll(Payday);
						}
					}
				    if(Hour == 23)
				    {
				    	Hour = 0;
				    	Minute = 0;
				    	Second = 0;
					}
					else
					{
					    Hour ++;
						Minute = 0;
						Second = 0;
					}
				}
				else
				{
				    Minute ++;
			    	Second = 0;
		  		}
			}
			format(string,sizeof (string),"%02i:%02i:%02i", Hour, Minute, Second);
			TextDrawSetString(Clock, string);
			SetWorldTime(Hour);
		}
	}
	return 1;
}
Reply


Messages In This Thread
Signcheck Problem. - by tiernantheman - 20.10.2012, 15:05
Re: Signcheck Problem. - by Roel - 20.10.2012, 16:16
Re: Signcheck Problem. - by tiernantheman - 20.10.2012, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)