[POMOC]Setskin

Započeo Vilko, Decembar 31, 2009, 08:53:03 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Ovako,zelim ubaciti u mod ovo
if(strcmp(cmd, "/setskin", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin id]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pChar] = level;
format(string, sizeof(string), "Your skin has been changed by Admin %s", sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "You have given %s skin to %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
}
}
return 1;
}


A gdje tocno da to ubacim

Citat: [CH]Hrvek poslato Decembar 31, 2009, 08:53:03 PRE PODNE
Ovako,zelim ubaciti u mod ovo
if(strcmp(cmd, "/setskin", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setskin [playerid/PartOfName] [skin id]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "Wrong skin ID!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pChar] = level;
format(string, sizeof(string), "Your skin has been changed by Admin %s", sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "You have given %s skin to %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
}
}
return 1;
}


A gdje tocno da to ubacim

Ubacis pod OnPlayerCommandText...

e ljudi meni treba u dcmd ili
vako
f (strcmp("/ah", cmdtext, true, 10) == 0)
Poslednja Izmena: Novembar 15, 2010, 16:09:44 POSLE PODNE od _MosT_WanteD_
LOL

Citat: _MosT_WanteD_ poslato Novembar 15, 2010, 15:59:45 POSLE PODNE
e ljudi meni treba u dcmd ili
vako
f (strcmp("/ah", cmdtext, true, 10) == 0)
TEMA je stara 1 godinu,koju kurac je refresh-aš? :S