Jump to content
  • 0

Intrebari scripting


MrBlack

Question

Am si eu cateva probleme daca ma puteti ajuta .

1. Vreau sa fac un textdraw miscator , adica sa apara ZumZone sa dispara si sa apara ZumZone ETC>..

2. Cum fac ca cineva sa vada numele doar cand se apropie de el...?

3. Cum fac sa se vada deasupra numelui ce a scris playerul?

4. Un tutorial cum sa bag /idcard pe server.

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

	if(strcmp(cmd, "/idcard", true) == 0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /idcard [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
				    if (ProxDetectorS(8.0, playerid, giveplayerid))
					{
					    new ttext[20];
					    if(gTeam[playerid] == 3 || gTeam[playerid] == 4) { ttext = "Civilian"; }
					    else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { ttext = "Factiune"; }
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
					    SendClientMessage(giveplayerid, COLOR_WHITE, "|_________ Identification Card _________|");
	      	  			format(string, sizeof(string), "** Name: %s.", sendername);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "** Level: %d.", PlayerInfo[playerid][pLevel]);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "** Phone Number: %d.", PlayerInfo[playerid][pPnumber]);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "** City: Los Santos.");
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "** Member: %s.", ttext);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "** Age: %d.", PlayerInfo[playerid][pAge]);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						format(string, sizeof(string), "** Wanted: %d.", WantedLevel[playerid]);
						SendClientMessage(giveplayerid, COLOR_GREY, string);
						SendClientMessage(giveplayerid, COLOR_WHITE, "|____________________________________|");
						format(string, sizeof(string), "* %s is showing his identification card to %s.", sendername ,giveplayer);
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
					    return 1;
					}
				}
			}
	        else
	        {
	            SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
	            return 1;
	        }
		}
	    return 1;
 	}

PS: Pentru a mai adauga factiuni copy: else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { ttext = "Factiune"; } apoi enter sub el si paste ;)

Link to comment
Share on other sites

Te ajut eu la intrebarea 3.

Pasul 1: Cauti " if (realchat)" in GM

Pui asta :

     [table]

{

if(PlayerInfo[playerid][pAdmin] >= 1)

   {

        format(string, sizeof(string), " %s ", text);

            SetPlayerChatBubble(playerid, string, 0xFFFF80FF, 30.0, 8000);

       }

[/table]

SUB

[table]

if(gPlayerLogged[playerid] == 0)

       {

            SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");

            return 1;

}

[/table]

Link to comment
Share on other sites

#Off-Topic Double-Post.

#2 =

pui asta oriunde

forward GetClosestPlayer(p1);

public GetClosestPlayer(p1)
{
	new x,Float:dis,Float:dis2,person;
	person = -1;
	dis = 99999.99;
	for (x=0;x<MAX_PLAYERS;x++)
	{
		if(IsPlayerConnected(x))
		{
			if(x != p1)
			{
				dis2 = GetDistanceBetweenPlayers(x,p1);
				if(dis2 < dis && dis2 != -1.00)
				{
					dis = dis2;
					person = x;
				}
			}
		}
	}
	return person;
}
La OnPlayerSpawn(playerid);
SetPlayerColor(playerid,0x000000);
SetTimer("find",100,1);
Asta tot oriunde
forward find();

public find()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
new p1;
p1 = GetClosestPlayer(playerid); 
SetPlayerColor(p1,Culoarea ta);
}
return 1;
}

la Culoarea Ta pui culoarea

Ne-Testat

Primu lucru care mi-a venit in minte :)

Link to comment
Share on other sites

Te ajut eu la intrebarea 3.

Pasul 1: Cauti " if (realchat)" in GM

Pui asta :

      [table]

{

if(PlayerInfo[playerid][pAdmin] >= 1)

    {

        format(string, sizeof(string), " %s ", text);

            SetPlayerChatBubble(playerid, string, 0xFFFF80FF, 30.0, 8000);

        }

[/table]

SUB

[table]

if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You havent logged in yet !");

            return 1;

}

[/table]

Nici nu ai nevoie de string acolo, faci doar chatbubble normal, scriptere =))))))

SetPlayerChatBubble(playerid, text, 0xFFFF80FF, 30.0, 8000);

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.