I cant use my command as a admin in FS ! it didn't work -
rhandie02 - 26.11.2014
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;
}
------
Re: I cant use my command as a admin in FS ! it didn't work -
Raweresh - 26.11.2014
Change:
Код:
if(IsPlayerAdmin(playerid))return 0;
To:
Код:
if(!IsPlayerAdmin(playerid))return 0;
Re: I cant use my command as a admin in FS ! it didn't work -
rhandie02 - 26.11.2014
still not working ..
Re: I cant use my command as a admin in FS ! it didn't work -
Raweresh - 26.11.2014
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.
Re: I cant use my command as a admin in FS ! it didn't work -
rhandie02 - 27.11.2014
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..
Re: I cant use my command as a admin in FS ! it didn't work -
Abagail - 27.11.2014
That text is not located within your command. Can you confirm that no other scripts are using the function cmd_createbiz?
Re: I cant use my command as a admin in FS ! it didn't work -
rhandie02 - 27.11.2014
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 ?