8 posts in this topic

Создание 3D текста из игры,БЕЗ СОХРАНЕНИЯ!!

Спойлер

if(strcmp(cmd, "/text", true) == 0)
            {
        if(Player[playerid][pAdmin] >= 1)
                {
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[128];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, -1, "ИНФО: /text [3D текст]");
                return true;
            }
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid,X,Y,Z);
            Create3DTextLabel(result, red, X,Y,Z, 20, GetPlayerVirtualWorld(playerid), 0); // red - цвет
        }
            return true;
}

 

 

Share this post


Link to post
Share on other sites
В 03.08.2017 в 23:36, RASTAMAN сказал:

Создание 3D текста из игры,БЕЗ СОХРАНЕНИЯ!!

  кмд (закрыть спойлер)


if(strcmp(cmd, "/text", true) == 0)
            {
        if(Player[playerid][pAdmin] >= 1)
                {
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[128];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, -1, "ИНФО: /text [3D текст]");
                return true;
            }
                        new Float:X,Float:Y,Float:Z;
                        GetPlayerPos(playerid,X,Y,Z);
            Create3DTextLabel(result, red, X,Y,Z, 20, GetPlayerVirtualWorld(playerid), 0); // red - цвет
        }
            return true;
}

 

 

Переведи плиз для DC_CMD

 

Share this post


Link to post
Share on other sites

@AnimeshniK,

Спойлер

CMD:text(playerid, params[])
{
	if(Player[playerid][pAdmin] >= 1)
	{
		if(!strlen(params))
		{
			SendClientMessage(playerid, -1, "ИНФО: /text [3D текст]");
			return true;
		}
		new Float:X,Float:Y,Float:Z;
		GetPlayerPos(playerid,X,Y,Z);
		Create3DTextLabel(params, red, X,Y,Z, 20, GetPlayerVirtualWorld(playerid), 0); // red - цвет
	}
	return true;
}

 

 

Share this post


Link to post
Share on other sites
В 30.10.2019 в 12:24, odosenok сказал:

@AnimeshniK,

  команда (закрыть спойлер)


CMD:text(playerid, params[])
{
	if(Player[playerid][pAdmin] >= 1)
	{
		if(!strlen(params))
		{
			SendClientMessage(playerid, -1, "ИНФО: /text [3D текст]");
			return true;
		}
		new Float:X,Float:Y,Float:Z;
		GetPlayerPos(playerid,X,Y,Z);
		Create3DTextLabel(params, red, X,Y,Z, 20, GetPlayerVirtualWorld(playerid), 0); // red - цвет
	}
	return true;
}

 

 

Спс,сори что так долго :] .
Плюсанул.

Share this post


Link to post
Share on other sites
error 029: invalid expression, assumed zero
(34209) : warning 215: expression has no effect
(34209) : error 001: expected token: ";", but found "]"
(34209) : error 029: invalid expression, assumed zero
(34209) : fatal error 107: too many error messages on one line

што делать
 

Share this post


Link to post
Share on other sites

@PATHRON, вроде должен работать.

 

Спойлер

cmd:text(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1) return 1;
    if(sscanf(params, "s[32]", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "/text [Текст]");
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    Create3DTextLabel(params[0], COLOR_WHITE, X, Y, Z, 20, GetPlayerVirtualWorld(playerid), 0);
    return 1;
}

Share this post


Link to post
Share on other sites
16 часов назад, [P]s1x0[P]aD сказал:

@PATHRON, вроде должен работать.

 

  Спойлер (закрыть спойлер)

cmd:text(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1) return 1;
    if(sscanf(params, "s[32]", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "/text [Текст]");
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    Create3DTextLabel(params[0], COLOR_WHITE, X, Y, Z, 20, GetPlayerVirtualWorld(playerid), 0);
    return 1;
}

Сделай пж ток для Фуллдоступа

Вот код кмд для фуллдоступа:

CMD:makeadminoff(playerid, params[])
CMD:makeadmin(playerid, params[])
{
    if(GetString(PN(playerid),FullDostup1) || GetString(PN(playerid),FullDostup2) || GetString(PN(playerid),FullDostup3) || GetString(PN(playerid),FullDostup4) || GetString(PN(playerid),FullDostup5) || GetString(PN(playerid),FullDostup6) || GetString(PN(playerid),FullDostup7) || GetString(PN(playerid),FullDostup8) || GetString(PN(playerid),FullDostup9) || GetString(PN(playerid),FullDostup10) || GetString(PN(playerid),FullDostup11) || GetString(PN(playerid),FullDostup12))
    {
    if(PlayerInfo[playerid][pAdmin] < 8) return false;
    if(ADuty[playerid]!=228) return SendClientMessage(playerid,COLOR_GREY,NO_DUTY_TEXT);
    new id,admin,string[400];
    if(sscanf(params,"ud",id,admin)) return SendClientMessage(playerid,COLOR_RED, !"Используйте: /makeadmin [id] [level (0 - 8)]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_VALIK,"Игрок не авторизован!");
    if(admin < 0 || admin > 8) return SendClientMessage(playerid,COLOR_VALIK,!"Используйте: /makeadmin [id] [level (0 - 8)]");
    SetAdminLevel(id,admin);
    format(string,sizeof(string),"[Информация] {FFFFFF}Вы выдали игроку %s %d-й уровень администратирования",Name(id),admin);
    SendClientMessage(playerid,COLOR_RED,string);
    format(string,sizeof(string),"Администратор %s назначил Вас администратором %d-го уровня",cPN(playerid),admin);
    SendClientMessage(id,COLOR_RED,string);
    format(string,sizeof(string),"Основатель %s назначил игрока %s админом %d-го уровня",Name(playerid),Name(id),admin);
    SendAdminsMessage(COLOR_RED,string);
    new stringer2[128];
    format(stringer2,sizeof(stringer2),"Админинистратор <a href=/logsaccount?name=%s>%s</a> назначил игрока <a href=/logsaccount?name=%s>%s</a> админом %d-го уровня",PN(playerid),Name(playerid),Name(id),Name(id),admin);
     AdminLogs(playerid, stringer2);
    AllLogs(playerid, stringer2);
    //aml(16, playerid, Name(id), "", admin);
    }

Edited by Oleg_Podriadov

Share this post


Link to post
Share on other sites
18 часов назад, [P]s1x0[P]aD сказал:

@PATHRON, вроде должен работать.

 

  Спойлер (открыть спойлер)

cmd:text(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1) return 1;
    if(sscanf(params, "s[32]", params[0])) return SendClientMessage(playerid, COLOR_WHITE, "/text [Текст]");
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    Create3DTextLabel(params[0], COLOR_WHITE, X, Y, Z, 20, GetPlayerVirtualWorld(playerid), 0);
    return 1;
}

Команда вообще не работает!

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Leo_Carter
      By Leo_Carter
      Такая проблема то что я пишу мод с нуля и когда почти мод был готов, я решил его залить на хостинг, ну там есть подключение к mysql и всё подобное, только вот залил на хостинг, запускаю и у меня вот такие дебаги вылезают и сервер Unknown

       
      Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, (C)2005-2015 SA-MP Team [18:54:42] filterscripts = "" (string) [18:54:42] [18:54:42] Server Plugins [18:54:42] -------------- [18:54:42] Loading plugin: mysql_static.so [18:54:42] >> plugin.mysql: R39-2 successfully loaded. [18:54:42] Loaded. [18:54:42] Loading plugin: pawncmd.so [18:54:42] Pawn.CMD plugin v3.1.4 by urShadow loaded [18:54:42] Loaded. [18:54:42] Loading plugin: pawnregex.so [18:54:42] Pawn.Regex plugin v1.1 by urShadow loaded [18:54:42] Loaded. [18:54:42] Loading plugin: crashdetect.so [18:54:42] CrashDetect v4.18.1 is OK. [18:54:42] Loaded. [18:54:42] Loading plugin: streamer.so [18:54:42] *** Streamer Plugin v2.8.2 by Incognito loaded *** [18:54:42] Loaded. [18:54:42] Loading plugin: sscanf.so [18:54:42] [18:54:42] =============================== [18:54:42] sscanf plugin loaded. [18:54:42] Version: 2.8.1 [18:54:42] (c) 2012 Alex "Y_Less" Cole [18:54:42] =============================== [18:54:42] Loaded. [18:54:42] Loaded 6 plugins. [18:54:42] [18:54:42] Filterscripts [18:54:42] --------------- [18:54:42] Loaded 0 filterscripts. [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int [18:54:42] Script[gamemodes/project.amx]: Run time error 19: "File or function is not found" [18:54:42] Number of vehicle models: 0 [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int [18:54:42] [debug] Run time error 19: "File or function is not found" [18:54:42] [debug] cache_get_value_name [18:54:42] [debug] cache_get_value_name_int