[pedido] Alguns comandos
#3

ZCMD / sscanf:
pawn Код:
CMD:trazer(playerid, params[])
{
    new id;
    if(sscanf(params,"d", id)) return false;
   
    new Float:x,Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(id, x+2, y, z);
    return 1;
}
stcmp / strtok:
pawn Код:
if(strcmp(cmd, "/trazer", true) == 0)
{
    new outro;
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return false;
    outro = strval(tmp);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(id, x+2, y, z);
    return 1;
}
Sу uma base simples, os outros sгo fбceis.
Reply


Messages In This Thread
[pedido] Alguns comandos - by Panico622 - 15.03.2012, 15:18
Re: [pedido] Alguns comandos - by The_Zer0CooL - 15.03.2012, 15:24
Re: [pedido] Alguns comandos - by Jeffrey_Hatrix Jeffrey_ - 15.03.2012, 15:25
Re: [pedido] Alguns comandos - by Panico622 - 15.03.2012, 15:36
Re: [pedido] Alguns comandos - by Jeffrey_Hatrix Jeffrey_ - 15.03.2012, 15:39
Re: [pedido] Alguns comandos - by Panico622 - 15.03.2012, 15:40
Re: [pedido] Alguns comandos - by Jeffrey_Hatrix Jeffrey_ - 15.03.2012, 15:41
Re: [pedido] Alguns comandos - by Panico622 - 15.03.2012, 15:49
Re: [pedido] Alguns comandos - by Panico622 - 15.03.2012, 15:54
Re: [pedido] Alguns comandos - by histire - 15.03.2012, 16:51

Forum Jump:


Users browsing this thread: 4 Guest(s)