Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock AddProperty(const name[], Float:X, Float:Y, Float:Z, price, sell)
- {
- PropertyCount++;
- new ID = PropertyCount;
- if(!strlen(name))
- {
- print("====================================================");
- printf("Property Error: You forgot to give property #%d a name!", ID);
- print(" This property will not be created ");
- print("====================================================");
- return 1;
- }
- if(price < 0)
- {
- print("=============================================================");
- print("Property Error: You cant give a property a price lower than 0");
- printf(" Property #%d will not be created ", ID);
- print("=============================================================");
- return 1;
- }
- if(sell < 0)
- {
- print("===============================================================");
- print("Property Error: You cant give players less than $0 when selling");
- printf(" Property #%d will not be created ", ID);
- print("===============================================================");
- return 1;
- }
- PropInfo[ID][PropExists] = 1;
- format(PropInfo[ID][PropName], 60, "%s", name);
- PropInfo[ID][PropX] = X;
- PropInfo[ID][PropY] = Y;
- PropInfo[ID][PropZ] = Z;
- PropInfo[ID][PropPrice] = price;
- PropInfo[ID][PropSell] = sell;
- PropInfo[ID][PropOwner] = -1;
- PropertyPickup[ID] = CreatePickup(1273, 1, X, Y, Z);
- return ID;
- }
Advertisement
Add Comment
Please, Sign In to add comment