SA-MP Forums Archive
[Pedido] CMD/strcmp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] CMD/strcmp (/showthread.php?tid=400075)



CMD/strcmp - Nikeeziin_Map - 16.12.2012

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;
}




Re: CMD/strcmp - JonathanFeitosa - 16.12.2012

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



Respuesta: CMD/strcmp - gabrielloko157 - 16.12.2012

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;
}


Respuesta: CMD/strcmp - gabrielloko157 - 16.12.2012

Mlz Double Post


Re: CMD/strcmp - Jason` - 16.12.2012

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


Respuesta: CMD/strcmp - gabrielloko157 - 17.12.2012

Ele pediu pra passar pra strcmp

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