SA-MP Forums Archive
[pedido] Alguns comandos - 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] Alguns comandos (/showthread.php?tid=325939)



[pedido] Alguns comandos - Panico622 - 15.03.2012

Alguem me ajuda com alguns comandos pra adm aki:

/trazer [id]
/trazertodos
/matar [id]
/matartodos
/tirararmas [id]
/darvida [id] (colete tambem)
/vidatodos (colete tbm)


Alguem ajuda?
Se nao kise nao precisa fazer tudo sу alguns ja ta OTIMO!!


Re: [pedido] Alguns comandos - The_Zer0CooL - 15.03.2012

/trazerall by: Stewie
pawn Код:
CMD:trazerall(playerid, params[])
{
     new index = -1, Float:pos[3];
     GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
     while(++index < MAX_PLAYERS)
     {
          SetPlayerPos(index, pos[0], pos[1], pos[2]);              
     }
     return 1;                      
}
Outros :
pawn Код:
CMD:vidat(playerid, params[])
{
    if(!IsPlayerAdmin) return SendClientMessage(playerid, -1, "SERVER: Vocк nгo tem acesso a este comando!");
    for(new i = 0 ; i < GetMaxPlayers () ; i++) {
        SetPlayerHealth (i, 100);
    }
    return true;
}
pawn Код:
CMD:matartodos(playerid, params[])
{
    if(!IsPlayerAdmin) return SendClientMessage(playerid, -1, "SERVER: Vocк nгo tem acesso a este comando!");
    for(new i = 0 ; i < GetMaxPlayers () ; i++) {
        SetPlayerHealth (i, 0);
    }
    return true;
}



Re: [pedido] Alguns comandos - Jeffrey_Hatrix Jeffrey_ - 15.03.2012

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.


Re: [pedido] Alguns comandos - Panico622 - 15.03.2012

Код:
C:\Users\AsR\Servidores\TSD The Star Drift-DM-Race\filterscripts\CAS.pwn(1292) : error 021: symbol already defined: "cmd_trazer"
PHP код:
CMD:trazer(playeridparams[])
{      
//<<<<< linha do erro
    
if(jInfo[playerid][AdminLevel] < 2) return SCM(playeridErroCor"Vocк nгo estб autorizado.");
    if(
sscanf(params,"d"id)) return false;
    new 
Float:x,Float:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(idx+2yz);
    return 
1;




Re: [pedido] Alguns comandos - Jeffrey_Hatrix Jeffrey_ - 15.03.2012

Jб tem um comando com tal nome... Verifique g.g


Re: [pedido] Alguns comandos - Panico622 - 15.03.2012

Quote:

Jб tem um comando com tal nome... Verifique g.g

verdade!Nen tinha visto


/trazer [id]
/trazertodos
/matar [id]
/matartodos
/tirararmas [id]
/darvida [id] (colete tambem)

/vidatodos (colete tbm)


Alguem Ajuda


Re: [pedido] Alguns comandos - Jeffrey_Hatrix Jeffrey_ - 15.03.2012

Tб brincando nй? tenta fazer algum sozinho parcero...
pawn Код:
CMD:matar(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return false;
    SetPlayerHealth(id, 0);
    return 1;
}



Re: [pedido] Alguns comandos - Panico622 - 15.03.2012

nao intendo nada disso nao
fica dificiu!


Re: [pedido] Alguns comandos - Panico622 - 15.03.2012

Como fazer uma mensagem global
(pra todos os players)


Re: [pedido] Alguns comandos - histire - 15.03.2012

sacanagem cara pegar os comando acima e pega como exemplo -.-

SendClientMessageToAll manda para geral.