[Pedido] CMD/strcmp
#1

Alguem pode Converter para min esse comando fazendo um grande favor ?

Quote:

CMD:afk(playerid,params[])
{
new name[24], str[128];
GetPlayerName(playerid,name,24);
if(afk[playerid] == 1) return SendClientMessage(playerid,-1,"{AA3333}* You are already afk!");
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw7);
SelectTextDraw(playerid,0xFFFFFFFF);
TogglePlayerControllable(playerid,0);
afk[playerid] = 1;
format(str,sizeof(str),"{AFAFAF}* %s(%d) is now away from keyboard (/AFK)",name,playerid);
SendClientMessageToAll(-1,str);
return 1;
}

Reply
#2

de
pawn Код:
CMD:afk(playerid,params[])
para
pawn Код:
if(!strcmp(cmdtext, "/afk", true))
Reply
#3

if(!strcmp(cmdtext, "/afk", true))
{
new name[24], str[128];
GetPlayerName(playerid,name,24);
if(afk[playerid] == 1) return SendClientMessage(playerid,-1,"{AA3333}* You are already afk!");
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw7);
SelectTextDraw(playerid,0xFFFFFFFF);
TogglePlayerControllable(playerid,0);
afk[playerid] = 1;
format(str,sizeof(str),"{AFAFAF}* %s(%d) is now away from keyboard (/AFK)",name,playerid);
SendClientMessageToAll(-1,str);
return 1;
}
Reply
#4

Mlz Double Post
Reply
#5

Nгo se esqueзa de colocar o comando na callback OnPlayerCommandText.
Reply
#6

Ele pediu pra passar pra strcmp

acho que se ele pediu pra passar pra strcmp й por que ele sabe que o comando й na onplayercommandtext
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)