[HELP] Command
#1

Hello,

i need help about command, when i type /sellitems boxer/knife 0 i dont have boxer/knife only Message "Nepoznata komanda!"

Код:
CMD:sellitems(playerid, params[])
{
new s[128];
new id;
new boxer;
new knife;
if(PlayerInfo[playerid][pPosao] == 1)
   {
if(sscanf(params,"s[128]",s))
{
 SCM(playerid,SVJETLOPLAVA,"KORISTI: {FFFFFF}/sellitems [Opcija]");
 SCM(playerid,-1,"OPCIJE: boxer - knife");
 return 1;
}
if(!strcmp(s, "boxer", false))
{
   if(sscanf(params,"du",boxer,id)) return SCM(playerid,SVJETLOPLAVA,"KORISTI:{FFFFFF} /sellitems [Boxer/Knife] [ID]");
   GivePlayerWeapon(id, 1, 1);

}
else if(!strcmp(s,"knife", false))
{
   if(sscanf(params,"du",knife,id)) return SCM(playerid,SVJETLOPLAVA,"KORISTI:{FFFFFF} /sellitems [Boxer/Knife] [ID]");
   GivePlayerWeapon(id, 22, 22);
}

else {
 SCM(playerid,RED,"Nepoznata komanda!");
}

}
return 1;
}
Reply
#2

Quote:
Originally Posted by shulk
Посмотреть сообщение
Hello,

i need help about command, when i type /sellitems boxer/knife 0 i dont have boxer/knife only Message "Nepoznata komanda!"

Код:
CMD:sellitems(playerid, params[])
{
new s[128];
new id;
new boxer;
new knife;
if(PlayerInfo[playerid][pPosao] == 1)
   {
if(sscanf(params,"s[128]",s))
{
 SCM(playerid,SVJETLOPLAVA,"KORISTI: {FFFFFF}/sellitems [Opcija]");
 SCM(playerid,-1,"OPCIJE: boxer - knife");
 return 1;
}
if(!strcmp(s, "boxer", false))
{
   if(sscanf(params,"du",boxer,id)) return SCM(playerid,SVJETLOPLAVA,"KORISTI:{FFFFFF} /sellitems [Boxer/Knife] [ID]");
   GivePlayerWeapon(id, 1, 1);

}
else if(!strcmp(s,"knife", false))
{
   if(sscanf(params,"du",knife,id)) return SCM(playerid,SVJETLOPLAVA,"KORISTI:{FFFFFF} /sellitems [Boxer/Knife] [ID]");
   GivePlayerWeapon(id, 22, 22);
}

else {
 SCM(playerid,RED,"Nepoznata komanda!");
}

}
return 1;
}
Change:
pawn Код:
if(!strcmp(s, "boxer", false))
else if(!strcmp(s,"knife", false))
to->
pawn Код:
if(!strcmp(s, "boxer", true))
else if(!strcmp(s,"knife", true))
Reply
#3

Dont work.
Reply
#4

pawn Код:
if(!strcmp(cmd, "/boxer", true))
else if(!strcmp(cmd, "/knife", true))
Reply
#5

When i Compile, pawno stop work
Reply
#6

BUMP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)