Command returning empty?
#1

Hello guys,

Yesterday i spent like 2 hours writing and trying to get this part of my vehicle script to work.

Any ideas why this string is returning empty?

Код:
                                new carlist1;
				new insurancea1[20];
				new alarma1[10];
				new locka1[10];
				carlist1 = PlayerInfo[playerid][pCarkey];
                if(PlayerInfo[playerid][pCarkey] == 2001)
                {
                    SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle in slot 1");
                    return 1;
				}
				else
				{
				    if(CarInfo[carlist1][cInsurance] == 0) { insurancea1 = "None"; }
                                    else if(CarInfo[carlist1][cInsurance] == 1) { insurancea1 = "Classic"; }
                                    else if(CarInfo[carlist1][cInsurance] == 2) { insurancea1 = "Advanced"; }
                                    if(CarInfo[carlist1][cAlarm] == 0) { alarma1 = "None"; }
                                    else if(CarInfo[carlist1][cAlarm] == 1) { alarma1 = "None"; }
                                    else if(CarInfo[carlist1][cAlarm] == 2) { alarma1 = "SecuTech"; }
                                    else if(CarInfo[carlist1][cAlarm] == 3) { alarma1 = "XSA"; }
                                    if(CarInfo[carlist1][cInsurance] == 0) { insurancea1 = "None"; }
                                    else if(CarInfo[carlist1][cInsurance] == 1) { insurancea1 = "Classic"; }
                                    else if(CarInfo[carlist1][cInsurance] == 2) { insurancea1 = "Advanced"; }
				    if(CarInfo[carlist1][cLock] == 0) { locka1 = "No"; }
                                    else if(CarInfo[carlist1][cLock] == 0) { locka1 = "Yes"; }
                                    new string[256];
                                    format(string,sizeof(string),"1) {33CCFF}Model:{FFFFFF} %s | {33CCFF}Fuel:{FFFFFF} %d l | {33CCFF}Locked:{FFFFFF} %s | {33CCFF}Insurance:{FFFFFF} %s | {33CCFF}Alarm:{FFFFFF} %s ", CarInfo[carlist1][cDescription], CarInfo[carlist1][cFuel] ,locka1, insurancea1, alarma1);
                    SendClientMessage(playerid, COLOR_WHITE ,string);
                }

Note: Yes, I wrote this script on my own, and no, i wont ever fully adapt zcmd or sscanf, im old-fashioned
Reply
#2

Too much colors on {COLOR} i think
Reply
#3

Quote:
Originally Posted by David (Sabljak)
Посмотреть сообщение
Too much colors on {COLOR} i think
David is correct. A quote from SA-MP Wiki:

Quote:
Originally Posted by SA-MP Wiki
Important Notes:
  • If a message is longer than 144 characters, it will not be sent.
Reply
#4

Thanks guys, you are awesome =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)