05.09.2011, 06:56
Quote:
strlen = strings length
pawn Code:
|
PHP Code:
CreateBusiness(BusinessName[], Float:XPos, Float:YPos, Float:ZPos, Price, Sell, Earn)
{
if(!strlen(BusinessName)) return 0; //If there is no name then it will not create the business
BusinessCount ++; //Adding 1 onto the businesscount so the first one will be BusinessInfo[0][....]
BusinessInfo[BusinessCount][BusX] = XPos; //Sets the Xpos into the variable for long term saving.
BusinessInfo[BusinessCount][BusY] = YPos; //Sets the Ypos into the variable for long term saving.
BusinessInfo[BusinessCount][BusZ] = ZPos; //Sets the Zpos into the variable for long term saving.
BusinessInfo[BusinessCount][BusCost] = Price; //Sets the price into the variable for long term saving.
BusinessInfo[BusinessCount][BusSell] = Sell; //Sets the Sell cost into the variable for long term saving.
BusinessInfo[BusinessCount][BusEarn] = Earn; // //Sets the earning into the variable for long term saving.
BusinessInfo[BusinessCount][BusOwner] = -1; //Sets the business owner into the variable for long term saving.
BusinessPickup[BusinessCount] = AddStaticPickup(1272, 19, XPos, YPos, ZPos, -1); //Adds the pickup
format(BusinessInfo[BusinessCount][BusName], 60, "%s", BusinessName); //Sets the business name into the variable for long term saving.
return BusinessCount; //Will return the business ID
}
public OnFilterScriptInit() //Change to OnFilterScriptInit if it's a filterscript =].
{
SetTimer("Payouttimer", PayoutTimer, true); //Sets the timer =].
CreateBusiness("TestBiz", 100.0, 100.0, 10.0, 13337, 10000, 100);
return 1;
}
Where to put it's co-ordinates??