[Pedido]0.3e Algemas
#1

Olб,gostaria se alguйm conseguiu encontrar o cуdigo(linha) que faz a animaзгo da imagem abaixo,jб procurei nas includes do SA:MP 0.3e e no fуrum porйm nгo encontrei,se alguйm puder me ajudar agradeзo.

Reply
#2

Nome :
SPECIAL_ACTION_CUFFED
Vejб ai :
https://sampwiki.blast.hk/wiki/SpecialActions
Reply
#3

pawn Код:
CMD:algemar(playerid, params[])
{
    new L_ID;
    if(sscanf(params, "u", L_ID)) return SendClientMessage(playerid, -1, "Utilize: /algemar [playerid]");
    return SetPlayerSpecialAction(L_ID, SPECIAL_ACTION_CUFFED);
}
Reply
#4

Vocкs esqueceram da algema!
pawn Код:
CMD:algemar(playerid, params[])
{
    new PTiD;
    if(sscanf(params, "u", PTiD)) return SendClientMessage(playerid, -1, "Uso: /algemar [id]");
    SetPlayerAttachedObject(PTiD, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
    SetPlayerSpecialAction(PTiD, SPECIAL_ACTION_CUFFED);
    return 1;
}
Reply
#5

desculpa intrometer,mas como que coloca assim ?
pawn Код:
if(strcmp("...
Reply
#6

pawn Код:
if(!strcmp(cmdtext, "/algemar", true))
{
    new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[256];
    tmp = strtok(cmdtext, idx);
    giveplayerid = strval(tmp);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "Uso Correto: /algemar [PlayerID]");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "[ERRO]: Jogador Nгo conectado!");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "O Jogador %s Algemou o Jogador %s!", sendername, giveplayer);
    SendClientMessageToAll(-1, string);    
    SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        return SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
    }
    return 1;
}
Acho que ficaria assim.
Reply
#7

#Edit--
Reply
#8

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/algemar", true))
{
    new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[256];
    tmp = strtok(cmdtext, idx);
    giveplayerid = strval(tmp);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "Uso Correto: /algemar [PlayerID]");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "[ERRO]: Jogador Nгo conectado!");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "O Jogador %s Algemou o Jogador %s!", sendername, giveplayer);
    SendClientMessageToAll(-1, string);    
    SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        return SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
    }
    return 1;
}
Acho que ficaria assim.
Pra q esse loop ? cada coisa... Olha eu sу nгo transformo pois sei q vai dar erro faceis que vcs propios poderiam resolver mas nгo vгo fazer isso, e tbm pois atuamente uso somente SSCANF e ZCMD.
Reply
#9

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/algemar", true))
{
    new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[256];
    tmp = strtok(cmdtext, idx);
    giveplayerid = strval(tmp);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "Uso Correto: /algemar [PlayerID]");
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "[ERRO]: Jogador Nгo conectado!");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "O Jogador %s Algemou o Jogador %s!", sendername, giveplayer);
    SendClientMessageToAll(-1, string);    
    SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        return SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
    }
    return 1;
}
Acho que ficaria assim.
Esse cуdigo foi disponibilizado no fуrum jб, nгo?
Reply
#10

Muito obrigado a todos que ajudaram.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)