Command, need a little help
#1

pawn Код:
else if(strlen(tmp) == "165")
How do I do this, so if they type "/clothes 165" - They get an error message, they cannot use skin 165.

Cheers.
Reply
#2

Код:
else if(strlen(tmp) == "165") 
{
SendClientMessage(playerid,//UR COLOR//,"You cannot use this ID!"); 
return 1;
}
?? Im not really familiar with that(strlen(tmp) == "165")...Im not sure exactly what you are asking

Wish I could help you properly though ;p
Reply
#3

You mean like this?
pawn Код:
CMD:skin(playerid,params[])
{
   new skinid;
   if(sscanf(params,"i",skinid)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /skin [skin id]");
   if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, 0xFF0000, "Invalid skin id");
   if(skinid == 165) return SendClientMessage(playerid, 0xFF0000FF, "You cannot use this skin"); //Here, it checks whether the skinid choosen is 165 or not.
Reply
#4

pawn Код:
CMD:Clothes(playerid,params[])
{
    if(!strlen(params)) return SendClientMessage(playerid,-1,"[USAGE] /Clothes [id]");
    if(strlen(params) == 165) return SendClientMessage(playerid,0xFF0000FF,"[ERROR] You can't use these clothes!");
    //Something else
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)