27.08.2016, 11:25
Here you go
PHP код:
CMD:ddafk(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][DD] >= 1) {
new string[256],kuldoneve[MAX_PLAYER_NAME];
new Text3D: AFK[MAX_PLAYERS];
SendClientMessage(playerid,0x99FF00AA,"Type /ddback when you back.");
GameTextForPlayer(playerid,"~r~ You are now AFK", 5000, 1);
AFK[playerid] = Create3DTextLabel("AFK", 0xFF0000FF, 0.0, 0.0, 2.0, 40, 0, 0);
Attach3DTextLabelToPlayer( AFK[playerid], playerid, 0.0, 0.0, 0.4);
TogglePlayerControllable(playerid, 0);
GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
format(string, sizeof(string), "[DareDevil]Newest Devil %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 2)
format(string, sizeof(string), "[DareDevil]Proud Devil %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 3)
format(string, sizeof(string), "[DareDevil]Light Devil%s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 4)
format(string, sizeof(string), "[DareDevil]Experienced Devil %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 5)
format(string, sizeof(string), "[DareDevil]Doom Knight %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 6)
format(string, sizeof(string), "[DareDevil]Death Wisher %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 7)
format(string, sizeof(string), "[DareDevil]Golden Devil %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 8)
format(string, sizeof(string), "[DareDevil]Elite Devils %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 9)
format(string, sizeof(string), "[DareDevil]The Maestro %s now away from keyboard",kuldoneve, playerid);
if(PlayerInfo[playerid][DD] == 10)
format(string, sizeof(string), "[DareDevil]The DareDevils %s now away from keyboard",kuldoneve, playerid);
SendClientMessageToAll(0xFFFF00AA, string);
} else return ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX, "ERROR", "You need to be higher DD Level to use this command", "OK", "Cancel");
return 1;}