Help Me Faster
#1

On This property creator property icon not showning

i try Rcon login and do locateproperty when it show red mark

I am Using This Property Creator

Quote:

#include <a_samp>
#define MAX_PROPERTIES 250

#define CREATE_PICKUPS

new TmpPickup[MAX_PROPERTIES];
new TotalPickups;

public OnFilterScriptInit()
{
new File:fhnd;
if(!fexist("SavedProperties.txt"))
{
fhnd=fopen("SavedProperties.txt",io_write);
fclose(fhnd);
print("File 'SavedProperties.txt' created succesfully!");
}
print("\n--------------------------------------");
print(" Properties By [R.P.D]Leon");
print("--------------------------------------\n");

return 1;
}

public OnFilterScriptExit()
{
for(new i; i<TotalPickups; i++)
{
DestroyPickup(TmpPickup[i]);
}
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256],tmp[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp("/addproperty", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;

new name[64], price, sell, earning;
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
format(name, 64, "%s", strtok(cmdtext,idx));
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "Use: /addproperty [name] [price] [sellvalue] [earning]");
return 1;
}
price = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "Use: /addproperty [name] [price] [sellvalue] [earning]");
return 1;
}
sell = strval(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "Use: /addproperty [name] [price] [sellvalue] [earning]");
return 1;
}
earning = strval(tmp);
new entry[128], entry2[128];
new File:hFile;
format(entry, 128, "AddProperty(\"%s\", %.2f, %.2f, %.2f, %d, %d, %d);", name, X, Y, Z, price, sell, earning);
format(entry2, 128, "\r\n%s",entry);
hFile = fopen("SavedProperties.txt", io_append);
fwrite(hFile, entry2);
fclose(hFile);
#if defined CREATE_PICKUPS
TmpPickup[TotalPickups] = CreatePickup(1272, 1, X, Y, Z);
#endif
TotalPickups++;
format(entry, sizeof(entry), "Saved Property \"%s\" in SavedProperties.txt!", name);
SendClientMessage(playerid,0x00FF00AA, entry);
return 1;
}
return 0;
}


strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}



This Is my properties see






Quote:

/*================================================= ================================================== *\
||================================================ ================================================== =||
|| ________ ________ ___ _ ______ ______ ________ ||
|| \ | _____| | ____ | | \ | | | _ \ | _ \ | ____ | / ||
|| ======== \ | |_____ | |____| | | |\ \ | | | | | | | |_| / | |____| | / ======== ||
|| | | _____ | | ____ | | | \ \| | | | | | | _ \ | ____ | | ||
|| ======== / ______| | | | | | | | \ \ | | |_| | | | \ \ | | | | \ ======== ||
|| / |________| |_| |_| |_| \__| |______/ |_| \_| |_| |_| \ ||
|| ||
|| ||
|| Example Property Filterscript ||
|| ||
||================================================ ================================================== =||
|| Created on the 2nd of April 2008 by =>Sandra<= ||
|| Do NOT remove any credits!! ||
\*================================================ ================================================== =*/


#include <a_samp>
#include <properties>

public OnFilterScriptInit()
{

print("----------------------------------------");
print(" Example Property Filterscript ");
print(" by =>Sandra<= ");
print("----------------------------------------");

UsePropertyTextDraw(0);
SetMaxPropertiesPerPlayer(2);
SetPayoutFrequency(120);

AddProperty("PetrolPump", 2189.18, 2470.07, 11.24, 900000, 850000, 980000);
AddProperty("MyHouse", 1652.44, 2710.27, 10.82, 7000, 5000, 1000);
AddProperty("Casino", 2225.00, 1835.97, 10.82, 50000, 40000, 950);
AddProperty("CaligulaCasino", 2193.18, 1670.24, 12.36, 500000, 15000, 7000);
AddProperty("WangsCar", -1967.98, 307.25, 35.17, 250000, 250000, 100000);
AddProperty("RoyalCasino", 2087.70, 1450.31, 10.82, 50000, 50000, 10000);
AddProperty("PirateShip", 2004.60, 1542.52, 13.59, 5000, 5000, 1000);
AddProperty("SerShop", 2087.53, 2079.66, 11.05, 25000, 25000, 12000);
AddProperty("TheRealCasino", 2164.64, 2163.59, 10.82, 1125000, 125000, 220000);
AddProperty("LeonPlaza", 2197.00, 2409.92, 10.82, 25000, 23000, 2000);
AddProperty("24/Seven", 2246.04, 2397.77, 10.82, 21000, 21000, 1900);
AddProperty("Charch", 2224.86, 2521.45, 10.82, 1000, 1000, 500);
AddProperty("WeddingShop", 2210.35, 2526.18, 10.82, 15000, 14000, 1000);
AddProperty("ToysShop", 1888.81, 2408.58, 11.17, 17000, 16000, 3000);
AddProperty("Binco", 2102.77, 2259.28, 11.02, 19000, 19000, 2000);
AddProperty("PizzaShop", 2085.35, 2223.69, 11.02, 2000, 2000, 2000);
AddProperty("ZipShop", 2092.25, 2223.82, 11.02, 2100, 2000, 2000);
AddProperty("TheBigCasino", 2162.66, 2060.47, 10.82, 2500000, 2500000, 2000000);
AddProperty("Bank", 2193.13, 1992.90, 12.29, 27000, 25000, 20000);
AddProperty("PaySpray", 2399.47, 1480.85, 10.82, 22000, 22000, 22000);
AddProperty("Motel", 2501.27, 1413.65, 10.82, 2225000, 2211000, 222000);
AddProperty("Gta", 2507.68, 1674.01, 10.82, 0, 0, 40000);
AddProperty("Leon_State", 2518.90, 1835.72, 10.82, 378000, 378000, 370000);
AddProperty("Bank1", 2544.56, 1971.15, 10.82, 25000, 25000, 24000);
AddProperty("Ammunation", 2537.31, 2080.96, 10.82, 256000, 255000, 25000);
AddProperty("Bar", 2438.01, 2063.52, 10.82, 5000, 5000, 4000);
AddProperty("Marrige-House", 2518.45, 2033.59, 11.17, 525000, 525000, 405000);
AddProperty("Burger.Shop", 2466.13, 2033.13, 11.06, 28000, 28000, 5000);
AddProperty("Blister.SexHouse", 2409.19, 2015.99, 10.82, 600000, 600000, 400000);
AddProperty("SexToysShop", 2420.02, 2064.39, 10.82, 80000, 80000, 4000);
AddProperty("PoliceStation", 2290.13, 2430.25, 10.82, 45000, 46000, 25000);
AddProperty("Welding_&_Wedding", 1998.09, 2300.88, 10.82, 5000, 6000, 5000);
AddProperty("Casino2", 1657.70, 2251.08, 11.07, 51000, 61000, 7000);
AddProperty("CarReapringShop", 1658.52, 2199.12, 10.82, 45000, 4500, 4000);
AddProperty("Leon.Park", 1542.22, 2140.86, 10.82, 45000, 45000, 6500);
AddProperty("HotelHarrison", 1477.24, 1990.92, 11.02, 445000, 445000, 46500);
AddProperty("HouseForSex", 1406.57, 1898.60, 11.46, 4000, 4000, 450);
AddProperty("Staduin", 1332.46, 2075.41, 12.99, 9000000, 9000000, 10000000);
AddProperty("Hospital", 1607.27, 1816.93, 10.82, 90000, 90000, 10000);
AddProperty("Airport", 1706.88, 1600.29, 10.15, 890000, 890000, 810000);
AddProperty("AirportParking", 1718.95, 1303.43, 10.80, 8000, 8000, 9000);
AddProperty("Gta-Arena-Hotel", 1931.70, 1347.80, 9.96, 888000, 888000, 999000);
AddProperty("its-Not-Oscar", 2171.62, 1285.65, 24.47, 50, 50000, 900000);
AddProperty("CheapParking", 2350.73, 1386.59, 49.83, 30, 10000, 1000);
AddProperty("Store", 2811.40, 1986.79, 10.82, 3000, 10000, 10000);
AddProperty("ZipPizza", 2782.30, 1454.65, 10.77, 38000, 4000, 30000);
AddProperty("Realway-Station", 2799.77, 1304.90, 10.89, 80700, 80700, 80000);
AddProperty("PatrolPump", 2637.26, 1128.58, 11.17, 7900, 7900, 8000);
AddProperty("SexForLife", 2545.23, 1023.57, 10.82, 2000, 2000, 1900);
AddProperty("TheCharch", 2489.84, 917.12, 11.02, 20000, 20000, 21000);
AddProperty("BestSocityForHouses", 2597.45, 756.44, 11.02, 120000, 120000, 221000);
AddProperty("SevalSocity", 1952.70, 703.52, 10.82, 90000, 90000, 80000);
AddProperty("Gta-Arena-Pool", 1759.16, 2782.73, 10.83, 50000, 15000, 15000);
AddProperty("Golf-Club", 1497.67, 2772.54, 10.82, 150000, 50000, 20000);
AddProperty("Leon_&_Badboy_House", 1304.68, 2526.24, 10.82, 900000, 900000, 1000000);
AddProperty("SevalSocity", 1915.66, 701.78, 11.13, 258000, 2500, 25000);
return 1;
}

public OnFilterScriptExit()
{
DestroyAllPropertyPickups();
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
ResetPlayerPropertyInfo(playerid);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);

//================================================== =========
if (strcmp("/propertyinfo", cmd, true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USE: /propertyinfo [PropertyID]");
return 1;
}
new prop = strval(tmp);
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
new Float:X, Float:Y, Float:Z;
new Price, Earning, SellValue, Name[64], Owner[MAX_PLAYER_NAME], Status[16];
GetPropertyInfo(prop, X, Y, Z, Price, SellValue, Earning);
format(Name, 64, "%s", GetPropertyName(prop));
format(Owner, MAX_PLAYER_NAME, "%s", GetPropertyOwner(prop));
format(Status, 16, "%s", GetPropertyStatus(prop));
new str[128];
format(str, 128, "Name: %s ** X: %.1f Y:%.1f ** Z:%.1f", Name, X, Y, Z);
SendClientMessage(playerid, 0xFFFFFFAA, str);
format(str, 128, "Price: $%d ** SellValue: $%d ** Earnings: $%d", Price, SellValue, Earning);
SendClientMessage(playerid, 0xFFFFFFAA, str);
format(str, 128, "Owner: %s", Owner);
SendClientMessage(playerid, 0xFFFFFFAA, str);
format(str, 128, "Status: %s", Status);
SendClientMessage(playerid, 0xFFFFFFAA, str);
return 1;
}
//================================================== =========
if (strcmp("/disableproperty", cmd, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new tmp[256];
tmp = strtok(cmdtext, idx);
new prop = strval(tmp);
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
ToggleProperty(prop, 0);
return 1;
}
if (strcmp("/enableproperty", cmd, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new tmp[256];
tmp = strtok(cmdtext, idx);
new prop = strval(tmp);
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
ToggleProperty(prop, 1);
return 1;
}
//================================================== =========
if (strcmp("/myproperties", cmdtext,true) == 0)
{
GetPlayerProperties(playerid);
return 1;
}
//================================================== =========
if (strcmp("/buyproperty", cmdtext, true) == 0)
{
BuyPropertyForPlayer(playerid);
return 1;
}
//================================================== =========
if (strcmp("/sellproperty", cmdtext, true) == 0)
{
SellPropertyForPlayer(playerid);
return 1;
}
//================================================== =========
if (strcmp("/locateproperty", cmd, true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /locateproperty [PropertyID]");
return 1;
}
new prop = strval(tmp);
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
LocatePropertyForPlayer(prop, playerid);
return 1;
}
//================================================== =========
if (strcmp("/SetPropertyPrice", cmd, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /SetPropertyPrice [PropertyID] [Price]");
return 1;
}
new prop = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /SetPropertyPrice [PropertyID] [Price]");
return 1;
}
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
new str[128];
new price = strval(tmp);
SetPropertyPrice(prop, price);
format(str, 128, "You've set the price of \"%s\" (ID: %d) to $%d", PropInfo[prop][PropName], prop, price);
SendClientMessage(playerid, 0x00FF00AA, str);
return 1;
}
//================================================== =========
if (strcmp("/SetPropertyValue", cmd, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /SetPropertyValue [PropertyID] [Value]");
return 1;
}
new prop = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /SetPropertyValue [PropertyID] [Value]");
return 1;
}
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
new str[128];
new value = strval(tmp);
SetPropertySellValue(prop, value);
format(str, 128, "You've set the value of \"%s\" (ID: %d) to $%d", PropInfo[prop][PropName], prop, value);
SendClientMessage(playerid, 0x00FF00AA, str);
return 1;
}
//================================================== =========
if (strcmp("/SetPropertyEarning", cmd, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /SetPropertyEarning [PropertyID] [Earning]");
return 1;
}
new prop = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USAGE: /SetPropertyEarning [PropertyID] [Earning]");
return 1;
}
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
new str[128];
new earning = strval(tmp);
SetPropertyEarning(prop, earning);
format(str, 128, "You've set the earning of \"%s\" (ID: %d) to $%d", PropInfo[prop][PropName], prop, earning);
SendClientMessage(playerid, 0x00FF00AA, str);
return 1;
}

//================================================== =========
if (strcmp("/disablecp", cmdtext, true) == 0)
{
DisablePlayerCheckpoint(playerid);
return 1;
}
//================================================== ========
if (strcmp("/GetPropertyID", cmdtext, true) == 0)
{
new ID = IsPlayerNearProperty(playerid);
if(ID == -1) return SendClientMessage(playerid, 0xFF0000AA, "You are too far away from a property!");
new str[128];
format(str, 128, "You are now near property ID '%d': \"%s\"", ID, PropInfo[ID][PropName]);
SendClientMessage(playerid, 0x00FFFFAA, str);
return 1;
}
//================================================== =========
if (strcmp("/SaveProperty", cmd, true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 0;
new prop = IsPlayerNearProperty(playerid);
if(prop == -1) return SendClientMessage(playerid, 0xFF0000AA, "You are not close enough to a property");
if(!DoesPropertyExists(prop)) return SendClientMessage(playerid, 0xFF0000AA, "This property does not exists!");
SaveProperty(prop, cmdtext[13]);
SendClientMessage(playerid, 0x00FF00AA, "Property Saved!");
return 1;
}
//================================================== =========
if (strcmp("/propertyhelp", cmdtext, true) == 0)
{
SendClientMessage(playerid, 0x0FFFFFFAA, "Property Commands:");
SendClientMessage(playerid, 0x0FFFFFFAA, "/buyproperty, /sellproperty, /myproperties, /getpropertyID");
SendClientMessage(playerid, 0x0FFFFFFAA, "/locateproperty [ID], /disableCP, /propertyinfo [ID]");
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0x0FFFFFFAA, "/SetPropertyPrice [ID] [Price]");
SendClientMessage(playerid, 0x0FFFFFFAA, "/SetPropertyValue [ID] [Value]");
SendClientMessage(playerid, 0x0FFFFFFAA, "/SetPropertyEarnin [ID] [Earning]");
SendClientMessage(playerid, 0x0FFFFFFAA, "/disableproperty [ID], /enableproperty [ID]");
SendClientMessage(playerid, 0x0FFFFFFAA, "/saveproperty [comment (optional)]");
}
return 1;
}
return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
OnPropertyPickupPickup(playerid, pickupid);
return 1;
}

strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

Reply
#2

You please use the PAWNO tags? [.pawn] [./pawn] (<= Remove those dots.)
Reply
#3

Sorry for offtopic. It is actually [.pawn][./pawn] [Remove dots]
Reply
#4

yey this script made Sandra[NL]
Indeed, the icon is not visible Because No there is in The Script
if you want
Add This
pawn Код:
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon( playerid, 31, X, Y, Z, 31, MAPICON_LOCAL );
Reply
#5

Where is These Dots
Reply
#6

in you property like this
IN Property
pawn Код:
AddProperty("SmileyForCheat's House", 2495.25, -1686.60, 13.51, 40000, 12500, 750);
And Add Icon In OnPlayerConnect
pawn Код:
SetPlayerMapIcon( playerid, 31, 2495.25, -1686.60, 13.51, 31, MAPICON_LOCAL );
Reply
#7

Now It Says


Quote:

C:\Documents and Settings\Kapil\Desktop\samp03\samp03\filterscripts \Exmpale.pwn(345) : error 017: undefined symbol "X"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#8

WTF
X It's Cordinaate :P
You make The Property in where cordinate
if like this
pawn Код:
SetPlayerMapIcon( playerid, 31, X, Y, Z, 31, MAPICON_LOCAL );
Change X,Y,Z With your Coordinate Like
pawn Код:
SetPlayerMapIcon( playerid, 31, 2495.25, -1686.60, 13.51, 31, MAPICON_LOCAL );
Just Try Go To Cj's House
Reply
#9

Now Its Showing Guys thank You Very Much Brothers

See
Reply
#10

WTF i mean you can check in goto Cj's House
But I'm Have No SAme

Like On The MAP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)