SA-MP Forums Archive
[AJUDA] Save '-' - 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: [AJUDA] Save '-' (/showthread.php?tid=324581)



[AJUDA] Save '-' - Mercurio - 10.03.2012

Olб, estou precisando de uma pequena funзгo que salve o objeto em que o player digitou o comando .-.


O comando:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], tmp[128], idx;
    cmd = strtok(cmdtext, idx);
   
    if(!strcmp("/hair", cmd, true))
    {
        new skin = GetPlayerSkin(playerid);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
        TextDrawSetString(MsgBox,"   Hair obtained");
        TextDrawShowForPlayer(playerid, MsgBox);
        SetTimerEx("Hide", 1500, false, "d", playerid);//19077 18975
        switch(strval(tmp))
        {
            case 1: SetPlayerAttachedObject(playerid, GetSlot(playerid), 19077, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
            case 2: SetPlayerAttachedObject(playerid, GetSlot(playerid), 18975, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5], SkinOffSet[skin][8], SkinOffSet[skin][8], SkinOffSet[skin][8]);
            default: SendClientMessage(playerid, 0xFF4040AA, "SYNTAX: /Hair 1 - 2");
        }
        return 1;
    }
Com toda gentileza do mundo se precisar de mais detalhes do cod... ( Й O DO CORDE CABELO )


Re: [AJUDA] Save '-' - Đeagle - 10.03.2012

Veja esse tutorial.

https://sampforum.blast.hk/showthread.php?tid=320022