Commands do not Work
#1

Код:
	if(strcmp(cmd, "/props 1", true) == 0) {
	  SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
	  SendClientMessage(playerid, COLOR_YELLOW, "Gay Gordo's: Price: $35000 SellValue: $5000: Earning: $2655");
	  SendClientMessage(playerid, COLOR_YELLOW, "Kiddie Pool: Price: $8000: SellValue: $782: Earning: $320");
	  SendClientMessage(playerid, COLOR_YELLOW, "BlackBlood's Mansion: Price: $1000000: SellValue: $89750: Earning: $60000");
	  SendClientMessage(playerid, COLOR_YELLOW, "Small Mall: Price: $125000: SellValue: $28000: Earning: $14000");
    SendClientMessage(playerid, COLOR_YELLOW, "Luck o' the Irish: Price: $600000: SellValue: $78000: Earning: $34000");
    SendClientMessage(playerid, COLOR_ORANGE, "For the next page of properties, type /props 2");
  return 1;
  }
  if(strcmp(cmd, "/props 2", true) == 0) {
	  SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
	  SendClientMessage(playerid, COLOR_YELLOW, "Las Venturas Airport: Price: $1250000: SellValue: $600000: Earning: $80000");
	  SendClientMessage(playerid, COLOR_YELLOW, "Binco: Price: $35000: SellValue: $12000: Earning: $4000");
	  SendClientMessage(playerid, COLOR_YELLOW, "Burger Shot: Price: $95000: SellValue: $30000: Earning: $8000");
	  SendClientMessage(playerid, COLOR_YELLOW, "Dirty Toilet: Price: $3246: SellValue: $1000: Earning: $268");
    SendClientMessage(playerid, COLOR_YELLOW, "Posh Country Club: Price: $800000: SellValue: $300000: Earning: $40000");
    SendClientMessage(playerid, COLOR_ORANGE, "For the next page of properties,");
	 return 1;
	 }
Reply
#2

The code seems fine to me , maybe its conflicting with another command or u missed a bracket somewhere
Reply
#3

i think it's because your commands are like /props 1 and /props 2, there is a space between them, so it is not accessible. No?
Reply
#4

Quote:
Originally Posted by pmk1
i think it's because your commands are like /props 1 and /props 2, there is a space between them, so it is not accessible. No?
i dont think so but maybe u are right , blackblood try removing spaces
Reply
#5

Try:
pawn Код:
if (strcmp("/props 1", cmdtext, true, 8) == 0)
    {
          SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
      SendClientMessage(playerid, COLOR_YELLOW, "Gay Gordo's: Price: $35000 SellValue: $5000: Earning: $2655");
      SendClientMessage(playerid, COLOR_YELLOW, "Kiddie Pool: Price: $8000: SellValue: $782: Earning: $320");
      SendClientMessage(playerid, COLOR_YELLOW, "BlackBlood's Mansion: Price: $1000000: SellValue: $89750: Earning: $60000");
      SendClientMessage(playerid, COLOR_YELLOW, "Small Mall: Price: $125000: SellValue: $28000: Earning: $14000");
    SendClientMessage(playerid, COLOR_YELLOW, "Luck o' the Irish: Price: $600000: SellValue: $78000: Earning: $34000");
    SendClientMessage(playerid, COLOR_ORANGE, "For the next page of properties, type /props 2");
  return 1;
  }

  if (strcmp("/props 2", cmdtext, true, 8) == 0) {
      SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
      SendClientMessage(playerid, COLOR_YELLOW, "Las Venturas Airport: Price: $1250000: SellValue: $600000: Earning: $80000");
      SendClientMessage(playerid, COLOR_YELLOW, "Binco: Price: $35000: SellValue: $12000: Earning: $4000");
      SendClientMessage(playerid, COLOR_YELLOW, "Burger Shot: Price: $95000: SellValue: $30000: Earning: $8000");
      SendClientMessage(playerid, COLOR_YELLOW, "Dirty Toilet: Price: $3246: SellValue: $1000: Earning: $268");
    SendClientMessage(playerid, COLOR_YELLOW, "Posh Country Club: Price: $800000: SellValue: $300000: Earning: $40000");
    SendClientMessage(playerid, COLOR_ORANGE, "For the next page of properties,");
     return 1;
     }
Reply
#6

Just a suggestion if all else fails, try using
dcmd or zcmd

Reply
#7

Or just change 'cmd' to 'cmdtext'.
Reply
#8

Quote:
Originally Posted by O_x
Try:
pawn Код:
if (strcmp("/props 1", cmdtext, true, 8) == 0)
    {
          SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
      SendClientMessage(playerid, COLOR_YELLOW, "Gay Gordo's: Price: $35000 SellValue: $5000: Earning: $2655");
      SendClientMessage(playerid, COLOR_YELLOW, "Kiddie Pool: Price: $8000: SellValue: $782: Earning: $320");
      SendClientMessage(playerid, COLOR_YELLOW, "BlackBlood's Mansion: Price: $1000000: SellValue: $89750: Earning: $60000");
      SendClientMessage(playerid, COLOR_YELLOW, "Small Mall: Price: $125000: SellValue: $28000: Earning: $14000");
    SendClientMessage(playerid, COLOR_YELLOW, "Luck o' the Irish: Price: $600000: SellValue: $78000: Earning: $34000");
    SendClientMessage(playerid, COLOR_ORANGE, "For the next page of properties, type /props 2");
  return 1;
  }

  if (strcmp("/props 2", cmdtext, true, 8) == 0) {
      SendClientMessage(playerid, COLOR_GREEN, "BlackBlood's freeroam: Created by [TLA]BlackBlood.");
      SendClientMessage(playerid, COLOR_YELLOW, "Las Venturas Airport: Price: $1250000: SellValue: $600000: Earning: $80000");
      SendClientMessage(playerid, COLOR_YELLOW, "Binco: Price: $35000: SellValue: $12000: Earning: $4000");
      SendClientMessage(playerid, COLOR_YELLOW, "Burger Shot: Price: $95000: SellValue: $30000: Earning: $8000");
      SendClientMessage(playerid, COLOR_YELLOW, "Dirty Toilet: Price: $3246: SellValue: $1000: Earning: $268");
    SendClientMessage(playerid, COLOR_YELLOW, "Posh Country Club: Price: $800000: SellValue: $300000: Earning: $40000");
    SendClientMessage(playerid, COLOR_ORANGE, "For the next page of properties,");
     return 1;
     }
That worked, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)