18.02.2017, 08:11
PHP код:
stock SaveEntrance(Float:x, Float:y, Float:z, Float:a, Float:ix, Float:iy, Float:iz, Float:ia, int, vw)
{
new query[512];
format(query, sizeof(query), "INSERT INTO `entrances` (`ex`, `ey`, `ez`, `ea`, `ix`, `iy`, `iz`, `ia`, `int`, `vw`) VALUES(%f, %f, %f, %f, %f, %f, %f, %f, %d, %d)", x, y, z, a, ix, iy, iz, ia, int, vw);
mysql_query(query);
tTotalEntrances++;
Entrances[tTotalEntrances][EntranceID] = mysql_insert_id();
Entrances[tTotalEntrances][eX] = x;
Entrances[tTotalEntrances][eY] = y;
Entrances[tTotalEntrances][eZ] = z;
Entrances[tTotalEntrances][eA] = a;
Entrances[tTotalEntrances][iX] = ix;
Entrances[tTotalEntrances][iY] = iy;
Entrances[tTotalEntrances][iZ] = iz;
Entrances[tTotalEntrances][iA] = ia;
Entrances[tTotalEntrances][EntranceInt] = int;
Entrances[tTotalEntrances][EntranceWorld] = vw;
Create3DTextLabel("Entrance", Your color here, x, y, z+0.5, 20.0, vw);
CreatePickup(1239, 1, x, y, z, 0);
return 1;
}
but there is also
CreateDynamic3DTextLabel() from streamer if you want it, you can set both vw and int for both interior and exterior entrances. It depends on your
for the down part the dialog thing
PHP код:
if(strcmp(cmd, "editentrancename", true) == 1)
{
ShowPlayerDialog(playerid, DIALOG_EDITDNAME, DIALOG_STYLE_INPUT, "Type specified door name", "NOTE: Must be valid length for name.", "Change", "Cancel");
return 1;
}
// on your dialog response add this
if(dialogid == DIALOG_EDITNAME)
{
if(strval(inputtext) < 4 || strval(inputtext) > 24) return ShowPlayerDialog(playerid, DIALOG_EDITDNAME, DIALOG_STYLE_INPUT, "Type specified door name", "NOTE: Must be valid length for name.", "Change", "Cancel");
new name[25];
name = strval(inputtext);
//you'll know the rest
}