I cant use my command as a admin in FS ! it didn't work
#1

Please help me to work these FS
--------------------

COMMAND:createbiz(playerid, params[])
{
new busid,cost,name[128];
new Float,Float:y;
if(!IsPlayerAdmin(playerid))return 0;
if(sscanf(params,"I(500000)S(For Sale)[128]",cost,name))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /createbiz [cost] [name]");
for(new i=0; i<MAX_BUSS; i++)
{
format(file,sizeof(file),"Business/%i.ini",i);
if(!dini_Exists(file))
{
busid = i;
break;
}
}
format(file,sizeof(file),"Business/%i.ini",busid);
BusinessInfo[busid][bName] = name;
BusinessInfo[busid][Cost] = cost;
GetPlayerPos(playerid, X, Y, Z);
GetPosInFrontOfPlayer(playerid, x, y, -2.5);
dini_Create(file);
dini_Set(file, "Name", name);
dini_Set(file, "Owner","No Owner");
dini_IntSet(file, "Cost",cost);
dini_FloatSet(file, "BusX", X);
dini_FloatSet(file, "BusY", Y);
dini_FloatSet(file, "BusZ", Z);
dini_FloatSet(file, "SpawnOutX", x);
dini_FloatSet(file, "SpawnOutY", y);
dini_FloatSet(file, "SpawnOutZ", Z);
dini_IntSet(file, "World",GetPlayerVirtualWorld(playerid));
dini_IntSet(file, "Interior",GetPlayerInterior(playerid));
dini_IntSet(file, "OwnedBus",0);
dini_IntSet(file, "HasOwner",0);
BusinessInfo[busid][CP] = CreateDynamicCP(X,Y,Z,1.0,GetPlayerVirtualWorld(pl ayerid),GetPlayerInterior(playerid),-1,50.0);
format(Label, sizeof(Label), "{ccccff}%s\n{999999}No Owner\n{00BC00}Cost: {999999}$%i\nID: %i", name,cost,busid);
BusinessInfo[busid][bLabel] = Create3DTextLabel(Label,White,X,Y,Z,100.0,GetPlaye rVirtualWorld(playerid),1);
format(String,sizeof(String),"BusinessCreated. Name: %s | Cost: $%i | Owner: No Owner | ID: %i",name,cost,busid);
SendClientMessage(playerid,Green,String);
return 1;
}
------
Reply
#2

Change:
Код:
if(IsPlayerAdmin(playerid))return 0;
To:
Код:
if(!IsPlayerAdmin(playerid))return 0;
Reply
#3

still not working ..
Reply
#4

What not working, why you can't use that command as admin, what you see when you use that command? Your sscanf format is worng i think.
Reply
#5

Quote:
Originally Posted by Raweresh
Посмотреть сообщение
What not working, why you can't use that command as admin, what you see when you use that command? Your sscanf format is worng i think.
i can use that FS but said "You not use that command" or what ever.. but im admin in game..
Reply
#6

That text is not located within your command. Can you confirm that no other scripts are using the function cmd_createbiz?
Reply
#7

Quote:
Originally Posted by Abagail
Посмотреть сообщение
That text is not located within your command. Can you confirm that no other scripts are using the function cmd_createbiz?
Its only one in FS. so i want to work it ingame while im admin there. I think imma use RCON ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)