27.04.2016, 01:20
I have a really big sscanf problem, i want to make something but i just don't know how to upi it together.
I want to use sscanf in different tasks, so look at the code
and nothing is happening,p please help me
I want to use sscanf in different tasks, so look at the code
pawn Код:
CMD:service(playerid, params[])
{
new id, izbor[16], price, Float:PosX, Float:PosY, Float:PosZ, str[128];
if(sscanf(params, "us[16]", id, price)) return SCM(playerid, UPUTABOJA, "[HELP]: /service [heal/repair/refill] [ID] [Price]");
if(!strcmp(izbor, "heal", true))
{
if(sscanf(params, "{s[16]}i", izbor, price)) return SCM(playerid, UPUTABOJA, "[HELP]: /service heal [ID] [Price($50-$500)]");
if(!IsPlayerConnected(id)) return SCM(playerid, ERRORCOLOR, "[ERROR]: That player is not online.");
GetPlayerPos(id, Float:PosX, Float:PosY, Float:PosZ);
if(!IsPlayerInRangeOfPoint(playerid, 5.0, PosX, PosY, PosZ)) return SCM(playerid, GREY, "You must be close to that player");
CenaLecenja[id] = price;
LecenjePonudio[id] = playerid;
}
return 1;
}