19.07.2008, 06:34
This is the code and i tried several timews to include it but failed
Thanx in advance
Код:
# if (strcmp(cmd, "/afk", true) == 0) # { # if(DMArena[playerid] == 1) return SendClientMessage(playerid, RED, "You can't activate this command in the DeathMatching arena."); # else if(afk[playerid] == 1) return SendClientMessage(playerid, RED, "You are already 'AFK' "); # else # { # afk[playerid] = 1; # SetPlayerColor(playerid,AFK); # TogglePlayerControllable(playerid,0); # GetPlayerName(playerid, playername, sizeof(playername)); # format(string, sizeof(string), "[NEWS]: %s is now Away From Keyboard[AFK]. ( /afk )", player); # SendClientMessageToAll(YELLOW, string); # SendClientMessage(playerid, GREEN, "Your status is now 'AFK'"); # } # return 1; # } # if (strcmp(cmd, "/back", true) == 0) # { # if(afk[playerid] ==0) return SendClientMessage(playerid, RED, "You're not 'AFK'"); # else # { # afk[playerid] = 0; # if(CCIsLogged[playerid]==1) { SetPlayerColor(playerid,LIGHTGREEN);} else { SetPlayerColor(playerid,PLAYER_COLOR);} # TogglePlayerControllable(playerid,1); # GetPlayerName(playerid, playername, sizeof(playername)); # format(string, sizeof(string), "[NEWS]: %s is back from being A.F.K. ( /back )", player); # SendClientMessageToAll(YELLOW, string); # SendClientMessage(playerid, GREEN, "You are back."); # } # return 1; # } #