01.09.2012, 12:42
How do I make this command to use in 10 minutes?
What to do when a player write / afk can write / back after 1 minute?
Код:
if(strcmp(cmd, "/granades", true) == 0) { if (PlayerInfo[playerid][pDonateRank] >= 3) { GivePlayerGun(playerid, 16); GivePlayerMoney(playerid, -50000); SendClientMessage(playerid, COLOR_GRAD1,"Ти закупи 10 гранати за 50,000$!"); } else { SendClientMessage(playerid, COLOR_GRAD1,"ERROR: Ти не си вип или нямаш нужните права,за да използваш командата!"); } return 1; }
Код:
if(strcmp("/afk", cmdtext, true) == 0) { SendClientMessage(playerid, COLOR_YELLOW, "Сега си AFK, напиши /back за да се върнеш отново!"); TogglePlayerControllable(playerid,0); label[playerid] = Create3DTextLabel("AFK",yellow,30.0,40.0,50.0,40.0,0); Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7); SetPlayerVirtualWorld(playerid, 28); new string3[70]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string3, sizeof(string3), "%s отиде AFK!", name); SendClientMessageToAll(COLOR_YELLOW, string3); return 1; } if(strcmp("/back", cmdtext, true) == 0) { SendClientMessage(playerid, COLOR_YELLOW, "Ти се завърна!"); TogglePlayerControllable(playerid,1); SetPlayerVirtualWorld(playerid, 0); new string3[70]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string3, sizeof(string3), "%s се завърна!", name); SendClientMessageToAll(COLOR_YELLOW, string3); Delete3DTextLabel(Text3D:label[playerid]); return 1; }