12.12.2012, 10:17
(
Последний раз редактировалось Fernado Samuel; 04.10.2013 в 18:09.
)
Removed
COMMAND:createbiz(playerid, params[])
{
new propid,cost,name[255];
new Float:x,Float:y;
if(!IsPlayerAdmin(playerid))return 0;
if(sscanf(params,"us[255]",cost,name))return SendClientMessage(playerid, 0xFF0000AA, "Usage: /createbiz [cost] [name]");
for(new i=0; i<MAX_PROPERTIES; i++)
{
format(file,sizeof(file),"Business/%i.ini",i);
if(!dini_Exists(file))
{
propid = i;
break;
}
}
format(file,sizeof(file),"Business/%i.ini",propid);
PropInfo[propid][PropName] = name;
PropInfo[propid][PropValue] = 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_IntSet(file, "OwnedBus",0);
for(new id; id<PropertiesAmount; id++)
{
PropInfo[id][PickupNr] = CreatePickup(1273, 1, PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ]);
}
format(String,sizeof(String),"BusinessCreated. Name: %s | Cost: $%i | Owner: No Owner | ID: %i",name,cost,propid);
SendClientMessage(playerid,-1,String);
return 1;
}
PropName[255]