Help with script
#1

Hello. I'm new at scripting so I need some help. I've tryed to make simple script but when I type command in-game it just shows Unknown Command. Here is the code:
Код:
CMD:setskin(playerid, params[])
{
   new TargetID, SkinID;
   if(sscanf(params, "ui", TargetID, SkinID)) return SendClientMessage (playerid, COLOR_GREEN, "Naudojimas: /skinas [TargetID] [SkinID]");
   if (!IsPlayerConnected(TargetID)) return SendClientMessage(playerid, COLOR_GREEN, "Zaidejas siuo metu neprisijunges.");
   if (SkinID < 0 || SkinID > 299) return SendClientMessage(playerid, COLOR_GREEN, "Sis skinas yra negalimas");
   SetPlayerSkin (TargetID, SkinID);
   SendClientMessage(TargetID, COLOR_GREEN, "Jusu skinas buvo pakeistas");
   SendClientMessage(playerid, COLOR_GREEN, "Zaidejo %TargetID skinas buvo pakeistas");
   return 1;

}
Reply
#2

try

pawn Код:
CMD:setskin(playerid, params[])
{
   new TargetID, SkinID;
   if(sscanf(params, "ud", TargetID, SkinID)) return SendClientMessage (playerid, COLOR_GREEN, "Naudojimas: /skinas [TargetID] [SkinID]");
   if (!IsPlayerConnected(TargetID)) return SendClientMessage(playerid, COLOR_GREEN, "Zaidejas siuo metu neprisijunges.");
   if (SkinID < 0 || SkinID > 299) return SendClientMessage(playerid, COLOR_GREEN, "Sis skinas yra negalimas");
   SetPlayerSkin (TargetID, SkinID);
   SendClientMessage(TargetID, COLOR_GREEN, "Jusu skinas buvo pakeistas");
   SendClientMessage(playerid, COLOR_GREEN, "Zaidejo %TargetID skinas buvo pakeistas");
   return 1;

}
Reply
#3

Nope. Still not working. But thanks for help.
Reply
#4

Same problem showing Unknown Command?
Reply
#5

Yes.
Reply
#6

ok now try this

pawn Код:
CMD:setskin(playerid, params[])
{
   new TargetID, SkinID,string[100];
   if(sscanf(params, "ud", TargetID, SkinID)) return SendClientMessage (playerid, COLOR_GREEN, "Naudojimas: /skinas [TargetID] [SkinID]");
   if (!IsPlayerConnected(TargetID)) return SendClientMessage(playerid, COLOR_GREEN, "Zaidejas siuo metu neprisijunges.");
   if (SkinID < 0 || SkinID > 299) return SendClientMessage(playerid, COLOR_GREEN, "Sis skinas yra negalimas");
   SetPlayerSkin (TargetID, SkinID);
   SendClientMessage(TargetID, COLOR_GREEN, "Jusu skinas buvo pakeistas");
   format(string,sizeof(string),"Zaidejo %d skinas buvo pakeistas",TargetID);
   SendClientMessage(playerid, COLOR_GREEN, string);
   return 1;

}
Reply
#7

Still not working
Reply
#8

Are you sure you have ZCMD include in your pawno/includes folder?

and in top of script

pawn Код:
#include <zcmd>
?
Reply
#9

No I don't have such include. I don't even have downloaded it.a
Reply
#10

thats the problem download it from

https://sampforum.blast.hk/showthread.php?tid=91354
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)