Skin remove?
#1

How can i scripting, that a Skin is removed, so that nobody can use it when he make /setskin skinnumber?
Reply
#2

pawn Код:
if(skin == what skin) return SendClientMessage(playerid,-1,"You cant use this skin.");
Reply
#3

And where must i insert it?
Reply
#4

Quote:
Originally Posted by Blackazur
Посмотреть сообщение
And where must i insert it?

pawn Код:
CMD:setskin(playerid,params[])
{
   new target,skin;
   if(sscanf(params,"ud",target,skin)) return SendClientMessage(playerid,-1,"/skin [id]");
   if(skin == skin u dont want) return SendClientMessage(playerid,-1,"You cant use that skin");
   SetPlayerSkin(playerid,skin);
   return 1;
}
Something like that.
Reply
#5

When i make that so i have error, i show you the command what i have:

COMMAND:setskin(playerid,params[])
{
new skin;
if(sscanf(params,"d",skin)) return NoSuccess(playerid,"Usage: /setskin <skinid>");
if(skin < 0 || skin > 299) return NoSuccess(playerid,"SkinIDs between 0 and 299!");

SetPlayerSkin(playerid,skin);
return 1;
}

I dont know how can i make that.
Reply
#6

//edit:

pawn Код:
COMMAND:setskin(playerid,params[])
{
   new skin;
   if(sscanf(params,"d",skin)) return NoSuccess(playerid,"Usage: /setskin <skinid>");
   if(skin ==skin u dont want)  return NoSuccess(playerid,"......");
   if(skin < 0 || skin > 299) return NoSuccess(playerid,"SkinIDs between 0 and 299!");

   SetPlayerSkin(playerid,skin);
   return 1;
}
Reply
#7

Try this
pawn Код:
COMMAND:setskin(playerid,params[])
{
new skin;
if(sscanf(params,"i",skin)) return SendClientMessage(playerid, 0xFF0000, "Usage: /setskin <skinid>");
if(skin < 0 || skin > 299) return SendClientMessage(playerid, 0xFF0000, "SkinIDs between 0 and 299!");
SetPlayerSkin(playerid,skin);
return 1;
}
Or this
pawn Код:
COMMAND:setskin(playerid,params[])
{
new skin;
if(sscanf(params,"i",skin)) return NoSuccess(playerid,"Usage: /setskin <skinid>");
if(skin < 0 || skin > 299) return NoSuccess(playerid,"SkinIDs between 0 and 299!");

SetPlayerSkin(playerid,skin);
return 1;
}
Reply
#8

@ HusS3n
Quote:

COMMAND:setskin(playerid,params[])
{
new skin;
if(sscanf(params,"d",skin)) return NoSuccess(playerid,"Usage: /setskin <skinid>");
if(skin == 99,92,0,-0) return NoSuccess(playerid,"You cannot use this Skin!");
if(skin < 0 || skin > 299) return NoSuccess(playerid,"SkinIDs between 0 and 299!");

SetPlayerSkin(playerid,skin);
return 1;
}

So i have it so now make, and it work not. >_>
Reply
#9

How about this?

pawn Код:
CMD:skinset(playerid, params[])
{
    new skin, sendername[MAX_PLAYER_NAME], string[128];
   
    if(sscanf(params,"i", skin)) return SendClientMessage(playerid, COLOR_RED,"[ADMIN] /setskin [SkinModel]");
    if(skin > 299 || skin < 1) return SendClientMessage(playerid, COLOR_RED, "You've inserted a wrong skin ID. Choose from 1-299");
   
    if(skin == 1) return SendClientMessage(playerid,-1,"You can't use that skin, choose another."); // Here put the skin ID you want to forbid using.
   
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string),"Your skin ID now is %d", skin);
    SendClientMessage(playerid, 0x47568497, string);
    SetPlayerSkin(playerid, skin);
   
    return 1;
}
Reply
#10

It work thx, but now it say to all Skins "You cant use that skin, choose another". Where must it put the Skin ID that i want that it forbid using?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)