My commands is kind bugged[SOLVED]
#1

Well uhm i've made repair command:

Код:
dcmd_repair(const playerid, const cmdtext[])
{
	#pragma unused cmdtext
	
	if(IsPlayerInAnyVehicle(playerid) == 1)
	if(Tanker[playerid] == 1)

		{

		if(repair[playerid] == 0)

			  {
					GameTextForPlayer(playerid,"~y~You are Repairing vehicle ~n~~n~wait 10 seconds!",10000, 3);
					TogglePlayerControllable(playerid, false);
					repair[playerid] = 1;
					
					SetTimer("Repair", 60000, 0);
					
					SetTimer("opoznienier", 10000, 0);
				}
				else
				{
				  SendClientMessage(playerid,0xE2C063FF, "You have to wait 1 minute before you can use this command again!");
				}
			}
	return 1;
}
And those are publics for the timers:

Код:
public opoznienier(playerid)
{
      TogglePlayerControllable(playerid, 1);
	  RepairVehicle(GetPlayerVehicleID(playerid));
	  GameTextForPlayer(playerid,"~y~ You repaired the vehicle!",1000, 1);

     return 1;
}
Код:
public Repair(playerid)
{
	repair[playerid] = 0;
 	return 0;
}
Now the problem is that this command works PERFECT for me! but if somebody else tries to use it, it dosent unfreeze him after 10seconds, and it sends:

Код:
GameTextForPlayer(playerid,"~y~ You repaired the vehicle!",1000, 1);
to me not to the player that is using this command at the moment. I tried many things to solve this
but it still dosent work. Please help!

Regards.
Reply


Messages In This Thread
My commands is kind bugged[SOLVED] - by kamilbam - 30.11.2009, 22:45
Re: My commands is kind bugged. - by miokie - 30.11.2009, 22:50
Re: My commands is kind bugged. - by kamilbam - 30.11.2009, 23:02

Forum Jump:


Users browsing this thread: 1 Guest(s)