SA-MP Forums Archive
[PEDIDO] CMD de Skin - 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 de Skin (/showthread.php?tid=231077)



[PEDIDO] CMD de Skin - [AF]Junior - 24.02.2011

procurei o carai a 4 e nгo achei sу sobre gangs mas quero 1 comando que vocк seja admin na rcon e digite /setarskin id da pessoa e o id da skin.

valeu...


Re: [PEDIDO] CMD de Skin - -GooGle- - 24.02.2011

aqui para voce
pawn Код:
if(strcmp("/skin", cmdtext, true, 5)==0){
if(IsPlayerAdmin(playerid)){
new skin[256];
skin = KcmD(1, cmdtext);
if(!strlen(skin)) return SendClientMessage(playerid,COR_AQUI,"Use: /skin [id da skin]");
SetPlayerSkin(playerid,strval(skin));
}else{
SendClientMessage(playerid,COR_AQUI,"Voce nao й admin");
return true;
}
return true;
}
Add isto ao final do gm
pawn Код:
stock KcmD(param, cmdtext[])
{
    new string[128], pos, var;
    format(string, sizeof(string), "%s ", cmdtext);

    while((pos = strfind(string, " ", true)) != -1)
    {
        if(var == param) return string;
        var++;

        strdel(string, 0, pos + 1);
        if(strcmp(string, " ", true, pos) == 0) goto end;
    }

end:
    string[0] = '\0';
    return string;
}