enum plInfo
{
Float:plX,
Float:plY,
Float:plZ,
plInt,
Float:plIntX,
Float:plIntY,
Float:plIntZ,
plText[256],
plPick,
Text3D:plLabel
}
new PlaceInfo[50][plInfo];
idx = 0;
while (idx < sizeof(PlaceInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%f|%f|%f|%i|%f|%f|%f|%s\n",
PlaceInfo[idx][plX],
PlaceInfo[idx][plY],
PlaceInfo[idx][plZ],
PlaceInfo[idx][plInt],
PlaceInfo[idx][plIntX],
PlaceInfo[idx][plIntY],
PlaceInfo[idx][plIntZ],
PlaceInfo[idx][plText]);
if(idx == 0)
{
file2 = fopen("places.cfg", io_write);
}
else
{
file2 = fopen("places.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
stock LoadPlace()
{
new splitter[8][256];
new strFromFile2[256];
new File: file = fopen("places.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(PlaceInfo))
{
fread(file, strFromFile2);
split(strFromFile2, splitter, '|');
PlaceInfo[idx][plX] = floatstr(splitter[0]);
PlaceInfo[idx][plY] = floatstr(splitter[1]);
PlaceInfo[idx][plZ] = floatstr(splitter[2]);
PlaceInfo[idx][plInt] = strval(splitter[3]);
PlaceInfo[idx][plIntX] = floatstr(splitter[4]);
PlaceInfo[idx][plIntY] = floatstr(splitter[5]);
PlaceInfo[idx][plIntZ] = floatstr(splitter[6]);
PlaceInfo[idx][plText] = splitter[7];
idx++;
}
fclose(file);
}
return 1;
}
if(strcmp(cmd,"/aplace",true) == 0)
{
tmp = strtok(cmdtext, idx);
editingplace[playerid] = strval(tmp);
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid,COLOR_GRAD4,"You aren't a senior admin or higher.");
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /aplace [placeid]");
return 1;
}
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"House Editing","Place Entrance\nPlace Exit\nPlace Text","Ok","Cancel");
}
if(dialogid == 2)
{
if(response)
{
switch(listitem)
{
case 0:
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new p = editingplace[playerid];
PlaceInfo[p][plX] = X;
PlaceInfo[p][plY] = Y;
PlaceInfo[p][plZ] = Z;
DestroyPickup(PlaceInfo[p][plPick]);
Delete3DTextLabel(PlaceInfo[p][plLabel]);
PlaceInfo[p][plPick] = CreatePickup(1318,28,PlaceInfo[p][plX],PlaceInfo[p][plY],PlaceInfo[p][plZ]);
new string[256];
format(string,sizeof(string),"%s\nID: %i",PlaceInfo[p][plText],p);
PlaceInfo[p][plLabel] = Create3DTextLabel(string,COLOR_YELLOW,PlaceInfo[p][plX],PlaceInfo[p][plY],PlaceInfo[p][plZ]+0.7,10.0,0,0);
OnPropUpdate();
SendClientMessage(playerid,COLOR_WHITE,"[Place] You have moved the entrance.");
}
case 1:
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new p = editingplace[playerid];
PlaceInfo[p][plIntX] = X;
PlaceInfo[p][plIntY] = Y;
PlaceInfo[p][plIntZ] = Z;
PlaceInfo[p][plInt] = GetPlayerInterior(playerid);
OnPropUpdate();
SendClientMessage(playerid,COLOR_WHITE,"[Place] You have moved the exit.");
}
case 2:
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Place Text","Please enter what text you would like to appear on the place.","Ok","Cancel");
}
}
}
}
if(dialogid == 3)
{
if(!strlen(inputtext)) return SendClientMessage(playerid,COLOR_WHITE,"You didn't enter anything..");
new p = editingplace[playerid];
format(PlaceInfo[p][plText],256,"%s",inputtext);
OnPropUpdate();
Delete3DTextLabel(PlaceInfo[p][plLabel]);
new string[256];
format(string,sizeof(string),"%s\nID: %i",PlaceInfo[p][plText],p);
PlaceInfo[p][plLabel] = Create3DTextLabel(string,COLOR_YELLOW,PlaceInfo[p][plX],PlaceInfo[p][plY],PlaceInfo[p][plZ]+0.7,10.0,0,0);
SendClientMessage(playerid,COLOR_WHITE,"[Place] You set the text..");
}
for(new p = 0; p < sizeof(PlaceInfo); p++)
{
PlaceInfo[p][plPick] = CreatePickup(1318,28,PlaceInfo[p][plX],PlaceInfo[p][plY],PlaceInfo[p][plZ]);
format(string,sizeof(string),"%s\nID: %i",PlaceInfo[p][plText],p);
PlaceInfo[p][plLabel] = Create3DTextLabel(string,COLOR_YELLOW,PlaceInfo[p][plX],PlaceInfo[p][plY],PlaceInfo[p][plZ]+0.7,10.0,0,0);
pickups++;
}
Still using GF? You gotta be kidding me
![]() Also you did not explain it like stated above. |
Absolute crap.
You haven't explained shit and you're promoting a crap script. |
Edited. And.. I'm just making a epic GF edit.. it's going to be the best one you've ever seen
![]() |