Sscanf problem. -
Addons - 23.07.2013
Hi boys.
Ok, so I downloaded sscanf.dll & sscanf2.inc and i put .dll in plugins (and server.cfg), and .inc in includes and i've written in gamemode "#include <sscanf2>" but i've got this error:
Код:
cannot read from file: "sscanf2"

I need sscanf for this line:
Код:
if(sscanf(params, "iiii", VehicleModel, Color1, Color2, Price)) return SendClientMessage(playerid, -1, "Type: /newbuycar [Model] [Color1] [Color2] [Price]");
Help!
Re: Sscanf problem. -
Nick.D - 23.07.2013
Make sure you've put sscanf2.inc in "pawno > include".
Re: Sscanf problem. -
JimmyCh - 23.07.2013
Okay listen what you're gonna do.
You put the plugin and include in a specific pawno folder, but you opened another pawno, which means it doesn't have the sscanf in the one you're using.
So go to where you put the sscanf files and open THAT SPECIFIC pawno.exe, and it will read it.
Re: Sscanf problem. -
ToiletDuck - 23.07.2013
remember to put inc pawno/includes and recompile it.. be sure to reopen again the pawno and recompile..
Re: Sscanf problem. -
Addons - 23.07.2013
Hehe, it worked. Thanks sooooo much!
Re: Sscanf problem. -
JimmyCh - 23.07.2013
No problem
Re: Sscanf problem. -
Addons - 23.07.2013
I'm very nervous. This fucking sscanf gives me headaches.
I've problem with:
Код:
if(sscanf(params, "iiii", VehicleModel, Color1, Color2, Price)) return SendClientMessage(playerid, -1, "Type: /newbuycar [Model] [Color1] [Color2] [Price]");
I want to convert to strcmp (i don't understand sscanf).
Command:
Код:
if(strcmp(cmd, "/newbuycar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] != 0)
{
new CarString[128], Float:PosX, Float:PosY, Float:PosZ, Float:Angle, VehicleModel, Color1, Color2, Price, CAR;
if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, -1, "Nu ai autorizatia sa folosesti aceasta comanda");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Trebuie sa fi logat ca si RCON sa creezi masini");
if(sscanf(params, "iiii", VehicleModel, Color1, Color2, Price)) return SendClientMessage(playerid, -1, "Type: /newbuycar [Model] [Color1] [Color2] [Price]");
GetPlayerPos(playerid, PosX, PosY, PosZ);
GetPlayerFacingAngle(playerid, Angle);
masinipersonale++;
PersonalCars[masinipersonale][CarModel] = VehicleModel;
PersonalCars[masinipersonale][CarPosX] = PosX;
PersonalCars[masinipersonale][CarPosY] = PosY;
PersonalCars[masinipersonale][CarPosZ] = PosZ;
PersonalCars[masinipersonale][CarAngle] = Angle;
PersonalCars[masinipersonale][CarColor1] = Color1;
PersonalCars[masinipersonale][CarColor2] = Color2;
PersonalCars[masinipersonale][CarPret] = Price;
PersonalCars[masinipersonale][CarPaintjob] = 255;
PersonalCars[masinipersonale][CarExploded] = 0;
strmid(PersonalCars[masinipersonale][CarOwner],"The State", 0, strlen("The State"), 128);
CAR = CreateVehicle(PersonalCars[masinipersonale][CarModel], PersonalCars[masinipersonale][CarPosX], PersonalCars[masinipersonale][CarPosY], PersonalCars[masinipersonale][CarPosZ], PersonalCars[masinipersonale][CarAngle], PersonalCars[masinipersonale][CarColor1], PersonalCars[masinipersonale][CarColor2], -1);
IDIS[CAR] = masinipersonale;
format(CarString, sizeof(CarString), "Aceasta masina este de vanzare. Pret: %s",PersonalCars[masinipersonale][CarPret], ".");
PersonalCars[masinipersonale][CarText] = Create3DTextLabel(CarString, -1, 0, 0, 0, 25, 0, 1);
Attach3DTextLabelToVehicle(PersonalCars[masinipersonale][CarText], CAR, 0.0, 0.0, 0.1);
SetVehicleNumberPlate(CAR, PersonalCars[GetCreatorID(masinipersonale)][CarOwner]);
SavePersonalCar();
}
else return SendClientMessage(playerid, -1, "Nu esti conectat !");
}
return 1;
}
Thanks. I will rep your help!