1 post in this topic

Всем привет! Выкладываю команду для RP отыгровок на сервере. 

Для тех, кто в танке поясню: данная команда позволяет писать от третьего лица с причастным оборотом (?) на DC_CMD / ZCMD / Pawn.CMD: 

Спойлер

CMD:todo(playerid, params[])
{
	new data_temp_text_todo[128], data_temp_string[54], data_player_name[24];
        GetPlayerName(playerid, data_player_name, 24);
	if(sscanf(params, "s[128]", data_temp_text_todo)) return SCM(playerid, 0xB4B5B7FF, "Используйте /todo [Текст*Действие]");
	if(strfind(data_temp_text_todo, "*") == -1) return SCM(playerid, 0xB4B5B7FF, "Используйте /todo [Текст*Действие]");
	format(data_temp_string, sizeof(data_temp_string), "', {DD90FF}- сказал(а) %s, ", data_player_name);
	new data_of_token = strfind(data_temp_text_todo, "*");
	strdel(data_temp_text_todo, strfind(data_temp_text_todo, "*"), strfind(data_temp_text_todo, "*")+1);
	strins(data_temp_text_todo, data_temp_string, data_of_token);
	strins(data_temp_text_todo, "'", 0);
	SetPlayerChatBubble(playerid, data_temp_text_todo, 0x6495EDFF, 20.0, 10000);
	ProxDetector(20.0, playerid, data_temp_text_todo, 0xE6E6E6E6,0xC8C8C8C8,0xAAAAAAAA,0x8C8C8C8C,0x6E6E6E6E);
	return 1;
}

 

Спойлер

// кинуть в конец мода: 
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:posx, Float:posy, Float:posz;
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		for(new i = 0; i <= GetPlayerPoolSize(); i++)
		{
				if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
			{
				GetPlayerPos(i, posx, posy, posz);
				tempposx = (oldposx -posx);
				tempposy = (oldposy -posy);
				tempposz = (oldposz -posz);
				if(((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
				{
					SendClientMessage(i, col1, string);
				}
				else if(((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
				{
					SendClientMessage(i, col2, string);
				}
				else if(((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
				{
					SendClientMessage(i, col3, string);
				}
				else if(((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
				{
					SendClientMessage(i, col4, string);
				}
				else if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
				{
					SendClientMessage(i, col5, string);
				}
			}
		}
	}
	return true;
}

 

Вырезано с StageRp

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

    • sweet
      By sweet
      Хелп,при компиле выдает ошибку C:\Users\PC\Desktop\pawno\pawno\include\objects.inc(1104) : error 029: invalid expression, assumed zero
      Сама строка в которой ошибка:    {-2032.7073,-73.8643,35.2484, -2006.3911,-52.6238,35.2704},
      Закройте тему,проблема решилась сама по себе