#1

Removed
Reply
#2

show us the enum for PropName and your value of name.
Reply
#3

Removed
Reply
#4

Try this
pawn Код:
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;
}
Reply
#5

Removed
Reply
#6

It should be. Are you getting problems with it?
Reply
#7

Removed
Reply
#8

I forgot to edit the main enum...
pawn Код:
PropName[255]
Change that under the enum
Reply
#9

Removed
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)