21.04.2018, 16:59
Quote:
I don't think the problem is in there...
Can you show me how you create the icons and the text above? I think its in the way you use your iterate |
PHP код:
CMD:createentrance(playerid, params[])
{
new name[40], Float:x, Float:y, Float:z, Float:a;
if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pGangMod])
{
return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
if(sscanf(params, "s[40]", name))
{
return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /createentrance [name]");
}
if(GetNearbyEntrance(playerid) >= 0)
{
return SendClientMessage(playerid, COLOR_GREY, "There is an entrance in range. Find somewhere else to create this one.");
}
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
for(new i = 0; i < MAX_ENTRANCES; i ++)
{
if(!EntranceInfo[i][eExists])
{
mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "INSERT INTO entrances (name, pos_x, pos_y, pos_z, pos_a, outsideint, outsidevw) VALUES('%e', '%f', '%f', '%f', '%f', %i, %i)", name, x, y, z, a - 180.0, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
mysql_tquery(connectionID, queryBuffer, "OnAdminCreateEntrance", "iisffff", playerid, i, name, x, y, z, a);
return 1;
}
}
SendClientMessage(playerid, COLOR_GREY, "Entrance slots are currently full. Ask Kirito to increase the internal limit.");
return 1;
}