30.11.2009, 22:45
Well uhm i've made repair command:
And those are publics for the timers:
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:
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.
Код:
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; }
Код:
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; }
Код:
GameTextForPlayer(playerid,"~y~ You repaired the vehicle!",1000, 1);
but it still dosent work. Please help!
Regards.