Ok Dawood Your Using So here you go
Delete These Lines:
#define Pickups "/Pickups/Pickups.ini"
}
else if (strcmp(cmd, "addprop", true) == 0) {
new name[100];
tmp = strtok(cmdtext, idx), name = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!IsPlayerCommandLevel(playerid,"addprop")) SendClientMessage(playerid, COLOR_RED, "You don't have access to use this command!");
else if (!strlen(name)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: /c addprop [Price] [Name]");
else {
new Float:X,Float:Y,Float:Z, szMsg[256];
GetPlayerPos(playerid,X,Y,Z);
AddStaticPickup(1,407,X,Y,Z);
format(szMsg,sizeof(szMsg),"Property added! Price:[ $%s ] Name:[ %s ]",tmp,name);
SendClientMessage(playerid, COLOR_GREEN, szMsg);
}
return 1;
}
}
else if (strcmp(cmd, "!pdistance", true) == 0) {
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !pdistance [PropertyID]");
else {
new contvvb[4][128];
split(dini_Get("/Pickups/Pickups.ini",tmp), contvvb, ' ');
format(szMsg,sizeof(szMsg),"Distance between:[ %s ] and pickup:[ %d ]: %d meters",gPlayers[playerid],strval(tmp),GetDistance(playerid,floatstr(contvvb[1]),floatstr(contvvb[2]),floatstr(contvvb[3])));
SendClientMessageToAll(BLUE, szMsg);
}
return 1;
}
LoadPickups();
public PlayerPropDistance(playerid,propid[],distance)
{
new as[4][128];
split(dini_Get("/Pickups/Pickups.ini",propid), as, ' ');
return (GetDistance(playerid,floatstr(as[1]),floatstr(as[2]),floatstr(as[3])) >= distance) ? false : true;
}
public LoadPickups()
{
print("Loading pickups, please wait...");
new PU;
if(!dini_Exists(Pickups)) return -1;
new data[4][256];
for (PU=1; PU<=250; PU++) {
new pos[256],fm[3];
format(fm,sizeof(fm),"%d",PU);
pos = dini_Get(Pickups,fm);
if (strlen(pos)) {
split(pos,data,' ');
AddStaticPickup(1,strval(data[0]),floatstr(data[1]),floatstr(data[2]),floatstr(data[3]));
}
}
printf("Pickups Loaded!");
return asp;
}
Okay Now that The Useless Files are gone lets make the Properties
use /s to get coords and add the first 3 coords [XYZ] in this format on on public OnGameModeInit()
AddStaticPickup(id,type,XYZ COORDS);
well Its Done But Not Ready to Use
Goto Folder Scriptfiles >Properties>Names //Add The Name Format: Idofthepickup)= Vice villa
Goto Folder Scriptfiles >Properties>Owners //Add The Owners" " Format:(Idofthepickup)=Ben
Goto Folder Scriptfiles >Properties>Prices //Add The Price " "Format:(Idofthepickup)=10001
Goto Folder Scriptfiles >Properties>Share//Add The Share " "Format:Idofthepickup)=yazeen
If u dont have any one Owner or share Leave it in this format:
(Idofthepickup)=None
example 1=none
And Compile and Ready To use!!!
OMG my hand aches lol Hope it helps and if u have Doubt ask me in Yahoo