10.06.2011, 16:51
Alright well I made a command that changes the business name, but when I type the command it shows the syntax, and if I type it correctly, it says Invalid business id (When it is the correct ID)
Using vortex script if anyone can figure it out
pawn Код:
command(setbusinessname, playerid, params[])
{
new Name[255], id, string[128];
if(sscanf(params, "z", id, Name)) {
if(Player[playerid][AdminLevel] >= 4) {
SendClientMessage(playerid, WHITE, "/setbusinessname [businessid] [Name]");
}
}
else {
if(Player[playerid][AdminLevel] >= 4) {
format(string, sizeof(string), "Businesses/Business_%d.ini", id);
if(!fexist(string)) {
SendClientMessage(playerid, WHITE, "Invalid business ID!");
return 1;
}
else {
Businesses[id][bName] = Name;
SaveBusiness(id);
format(string, sizeof(string), "You have set the business name to %d.", Name);
SendClientMessage(playerid, WHITE, string);
}
}
}
return 1;
}