Originally Posted by [Sk
Noob ]
But how can i remove the gametext by command like /off and it'll remove the gametext |
if(strcmp(cmdtext, "/counter", true) == 0) { if(IsPlayerConnected(playerid)) { new tmpcar = GetPlayerVehicleID(playerid) - 1; if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 5) { if(!IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_VEH, " You are not in a car."); return 1; } if(DynamicCars[tmpcar][FactionCar] != PlayerInfo[playerid][pFaction]) { SendClientMessage(playerid, COLOR_VEH, " You are not in a faction vehicle."); return 1; } PlayerActionMessage(playerid,15.0,"turns on the counter."); SetTimer("countdown",500,0); } } else { SendClientMessage(playerid, COLOR_VEH, "Invalid Faction."); return 1; }}
forward countdown(playerid); public countdown(playerid) { static loops = 10; if (loops) { new cdtimer = SetTimer("countdown", 3000, 0); #pragma unused cdtimer new str[256]; format(str, sizeof (str), "~w~Counter: %d$", loops); GameTextForPlayer(playerid,str,1000,4); for(new i=0; i<MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { } } loops++; } else { for(new i=0; i<MAX_PLAYERS; i++) { { if (IsPlayerConnected(i)) { } } loops = 10; } } }
new KillCountDown;
if(strcmp(cmdtext, "/counter", true) == 0) { if(IsPlayerConnected(playerid)) { new tmpcar = GetPlayerVehicleID(playerid) - 1; if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 5) { if(!IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_VEH, " You are not in a car."); return 1; } if(DynamicCars[tmpcar][FactionCar] != PlayerInfo[playerid][pFaction]) { SendClientMessage(playerid, COLOR_VEH, " You are not in a faction vehicle."); return 1; } PlayerActionMessage(playerid,15.0,"turns on the counter."); KillCountDown = SetTimer("countdown",500,0); } } else { SendClientMessage(playerid, COLOR_VEH, "Invalid Faction."); return 1; }}
KillTimer(KillCountDown);