Command script request
#1

Hey, I'm looking for someone to make me a /setskin command to change someone's (ID's) skin to whatever I want (/setskin [ID] [Skin ID]).
I don't need any admin mode or something, just need this command.
Thanks for help.
Reply
#2

Here, using zcmd and sscanf.
pawn Код:
CMD:setskin(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new
            ID,
            Skin;

        if(sscanf(params, "ui", ID, Skin)) return SendClientMessage(playerid, COLOR_RED, "/setskin [name/id] [SkinID}"),
        SendClientMessage(playerid, COLOR_YELLOW, "This command will set a player's skin.");
        if(Skin < 0 || Skin > 299) return SendClientMessage(playerid, COLOR_YELLOW, "Invalid skin ID. Use 0-299.");

        return SetPlayerSkin(ID, Skin);
    }
    else return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
}
Reply
#3

Not good, I said, whitout admin mode or something like that, I need it to everyone who's on my server to make skin to everyone, I mean, If I'm not admin, I want to change someone's skin.
Reply
#4

pawn Код:
CMD:setskin(playerid, params[])
{
    new id, skinid;

    if(sscanf(params, "ui", ID, Skin)) return SendClientMessage(playerid, -1, "/setskin [playerid] [skinid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Invalid player ID");
    if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, -1, "Invalid skin ID");
    SetPlayerSkin(id, skindid);
    return 1;
}
this?
Reply
#5

Код:
C:\Users\User\Desktop\samp03dsvr_R2_win32\gamemodes\Gangwar.pwn(717) : error 017: undefined symbol "sscanf"
C:\Users\User\Desktop\samp03dsvr_R2_win32\gamemodes\Gangwar.pwn(720) : error 017: undefined symbol "skindid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

Quote:
Originally Posted by emokidx111
Посмотреть сообщение
pawn Код:
CMD:setskin(playerid, params[])
{
    new id, skinid;

    if(sscanf(params, "ui", ID, Skin)) return SendClientMessage(playerid, -1, "/setskin [playerid] [skinid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Invalid player ID");
    if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, -1, "Invalid skin ID");
    SetPlayerSkin(id, skindid);
    return 1;
}
this?
huh found error
Код:
new id, skinid;
Код:
SetPlayerSkin(id, skindid);//here it's error skindid?
Reply
#7

Quote:
Originally Posted by Alexy_Dramon
Посмотреть сообщение
huh found error
Код:
new id, skinid;
Код:
SetPlayerSkin(id, skindid);//here it's error skindid?
Another mistake he did is

pawn Код:
new id, skinid;


but in sscanf code he did

if(sscanf(params , "ui" , ID, Skin))
My code is totally bug free and is working properly.
Reply
#8

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
Another mistake he did is

pawn Код:
new id, skinid;


but in sscanf code he did

if(sscanf(params , "ui" , ID, Skin))
My code is totally bug free and is working properly.
So if you can fix it, so fix it please, I need it ~today~...
Reply
#9

I tryed something else, how to fix it?:

PHP код:
C:\DOCUME~1\hebrew\Desktop\RAVENS~1.3D_\RAVEN'~1.2\GAMEMO~1\Untitled.pwn(5) : fatal error 100: cannot read from file: "V-Colors"
Compilation aborted.Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase
1 Error. 
Reply
#10

Код:
C:\Users\User\Desktop\samp03dsvr_R2_win32\gamemodes\Gangwar.pwn(713) : error 017: undefined symbol "sscanf"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Damn how do i fix this error This sscanf
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)