How to edit ?
#1

if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}Foloseste{FFFFFF}: /setskin [playerid/PartOfName] [skin id]");
return 1;
}
new playa;
new health;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
health = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new name[20];
new victim[20];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(playa, victim, sizeof(victim));
PlayerInfo[playa][pModel] = health;
PlayerInfo[playa][pChar] = health;
SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}[Server-In-Lucru RPG]: {FFFFFF}Nu esti autorizat sa folosesti aceasta Comanda.");
}
}
return 1;
}


hello, how can I do this command to use it on you, not on the other player , /setskin [id] [skin id] i want only to use /setskin [skin id] and give me that skin only me not for other players like /setskin marian 29
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=547168
Reply
#3

and how can i do it without cmd ? and with /setskin ?
Reply
#4

C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068 : error 029: invalid expression, assumed zero
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068 : error 017: undefined symbol "cmd_skin"
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068 : error 029: invalid expression, assumed zero
C:\Users\StR\Desktop\Server-In-Lucru\gamemodes\server.pwn(1068 : fatal error 107: too many error messages on one line

the line is: CMDkin(playerid, params[])
Reply
#5

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
{
    if(PlayerInfo[playerid][pAdmin] < 4) SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}[Server-In-Lucru RPG]: {FFFFFF}Nu esti autorizat sa folosesti aceasta Comanda.");
    else{
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}Foloseste{FFFFFF}: /setskin [skin id]");
        new skin = strval(tmp);
        // IsValidSkin here
        SetPlayerSkin(playerid, skin);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)