Jump to content
  • 0

Question

Posted

Deci am incercat sa fac din comanda /gethere sa apara asa : Adminul x a adus la el playerul x ... imi apare doar Adminul x  a adus playerul.

Cum pot face sa apara si pe cine am adus?

comanda.. :

if(strcmp(cmd, "/gethere", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /gethere [playerid/PartOfName]");
				return 1;
			}
			new Float:plocx,Float:plocy,Float:plocz;
			new plo;
			plo = ReturnUser(tmp);
			if (IsPlayerConnected(plo))
			{
			    if(plo != INVALID_PLAYER_ID)
			    {
					if (PlayerInfo[plo][pAdmin] > 7)
					{
						SendClientMessage(playerid, COLOR_GRAD1, "Ask the admin to goto you.");
						return 1;
					}
					if(PlayerInfo[plo][pJailed] == 1)
                         {
                         SendClientMessage(playerid, 0x0000D2FF, "Playerul acela este in jail!");
						return 1;
					}
					if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAgent] >= 3)
					{
						GetPlayerPos(playerid, plocx, plocy, plocz);
						if(PlayerInfo[playerid][pInt] > 0)
						{
							SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
							PlayerInfo[plo][pInt] = PlayerInfo[playerid][pInt];
							PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
						}
						if(PlayerInfo[playerid][pInt] == 0)
						{
							SetPlayerInterior(plo,0);
						}
						if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0) //the highest land point in sa = 526.8
						{
							SetPlayerInterior(plo,1);
							PlayerInfo[plo][pInt] = 1;
						}
						if (GetPlayerState(plo) == 2)
						{
							TelePos[plo][0] = 0.0;
							TelePos[plo][1] = 0.0;
							new tmpcar = GetPlayerVehicleID(plo);
							SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
						}
						else
						{
							SetPlayerPos(plo,plocx,plocy+2, plocz);
						}
                SendClientMessage(playerid, COLOR_GRAD1, "   Te-ai teleportat cu succes !");
				GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, 256, "{3366FF}Adminul{FFFFFF} {FF0000}%s{FFFFFF} {3366FF}a adus la el playerul{FFFFFF} {FFD700}%s{FFFFFF}", sendername);
			    ABroadCast(COLOR_ORANGE,string,1);
				SetPlayerInterior(playerid,0);
				PlayerInfo[playerid][pInt] = 0;
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD1, "   nu esti autorizat sa folosesti aceasta comanda!");
					}
				}
			}
			else
			{
				format(string, sizeof(string), "   %d nu este online.", plo);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}

6 answers to this question

Recommended Posts

Posted

Modifica marimea stringului..

[pawn]format(string, MARIME, "{3366FF}Adminul{FFFFFF} {FF0000}%s{FFFFFF} {3366FF}a adus la el playerul{FFFFFF} {FFD700}%s{FFFFFF}", sendername);[/pawn]

Rate me :)

Posted
new get[MAX_PLAYER_NAME+1];
GetPlayerName(plo, player, sizeof( playerid ));
format(string, 256, "{3366FF}Adminul{FFFFFF} {FF0000}%s{FFFFFF} {3366FF}a adus la el playerul{FFFFFF} {FFD700}%s{FFFFFF}", sendername, player);

Just Rock

Posted

if(strcmp(cmd, "/getcar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /getcar [carid]");
				return 1;
			}
			new Float:plocx,Float:plocy,Float:plocz;
			new plo;
			plo = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAgent] >= 4)
			{
				GetPlayerPos(playerid, plocx, plocy, plocz);
				SetVehiclePos(plo,plocx,plocy+4, plocz);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   nu esti autorizat sa folosesti aceasta comanda!");
			}
		}
		return 1;
	}

Sa apara si masina.. pe care o aduc la mine

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.