Commands interfering.
#1

Could someone explain to me why /cellout uses /cellin? Or why /fix calls the /fix command, but also goes "Faction: x" - I realize it's because the commands are interfering, but this is pissing me off. Halp plz!

pawn Код:
if(!strcmp(cmdtext, "/cellin", true, 7))
    {
      if(TakingTut[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are viewing the tutorial. You cannot use this command now.");
      if(!IsPlayerInAnyVehicle(playerid))
      {
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
        return 1;
        }
    }
    if(!strcmp(cmdtext, "/cellout", true, 8))
    {
      if(TakingTut[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are viewing the tutorial. You cannot use this command now.");
      if(!IsPlayerInAnyVehicle(playerid))
      {
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
        return 1;
        }
    }
Reply
#2

Pff Use this:
Код:
if(!strcmp(cmdtext, "/cellin", true, 7)==0)
{
  if(TakingTut[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are viewing the tutorial. You cannot use this command now.");
  if(!IsPlayerInAnyVehicle(playerid))
  {
  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  }
  return 1;
}
if(!strcmp(cmdtext, "/cellout", true, 8)==0)
{
  if(TakingTut[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are viewing the tutorial. You cannot use this command now.");
  if(!IsPlayerInAnyVehicle(playerid))
  {
  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
  }
  return 1;
}
Reply
#3

See, I knew it would be some stupid simple shit that anyone should know, that I just don't.

Thanks
Reply
#4

Quote:
Originally Posted by DJDhan
Pff Use this:
Код:
if(!strcmp(cmdtext, "/cellin", true, 7)==0)
{
  if(TakingTut[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are viewing the tutorial. You cannot use this command now.");
  if(!IsPlayerInAnyVehicle(playerid))
  {
  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  }
  return 1;
}
if(!strcmp(cmdtext, "/cellout", true, 8)==0)
{
  if(TakingTut[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are viewing the tutorial. You cannot use this command now.");
  if(!IsPlayerInAnyVehicle(playerid))
  {
  SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
  }
  return 1;
}
That shit gave me phat tag mismatches. Someone who knows what they're talking about, help please? Sorry bout the double post.
Reply
#5

What line did tag mismatch come on?
Reply
#6

All of the lines with the /'something' command, when I added == 0 to them, like the other guy showed.

I think he messed his code up.

Anyway, another problem,

'/ann Hey' = "Announcement: Hey"

however,

'/annxxxx' = "Announcement: xxx"

Anyone got a fix for this? I assume it's the same solution as to my other problems.
Reply
#7

12-hour bump.
Reply
#8

Quote:
Originally Posted by IcyBlight
12-hour bump.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)