Jump to content
  • 0

Help cmd /tpevent


YumeDany

Question

Salut , Am si eu comanda aceasta este "/goto" am incercat sa o modific pentru event .. mai exat cand un admin face event playeri care vor sa participe sa scrie comanda aceasta ... doar ca am incercat sa scot playerid adica sa nu mai introduca idu dar nu imi merge 

if(strcmp(cmd, "/tpevent", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
                        if(PlayerInfo[playerid][pEvent] == 0)
			{
				SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{4FD359}----{FFFFFF}]: Pentru a folosi comanda trebuie sa organizezi un event");
				return 1;
			}
			tmp = strtok(cmdtext, idx);
			new Float:plocx,Float:plocy,Float:plocz;
			new plo;
			plo = ReturnUser(tmp);
			if (IsPlayerConnected(plo))
			{
			    if(plo != INVALID_PLAYER_ID)
			    {
					if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGM] >= 1)
					{
					    GetPlayerPos(plo,plocx,plocy,plocz);
						if (GetPlayerState(playerid) == 2)
						{
							new tmpcar = GetPlayerVehicleID(playerid);
							SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
							TelePos[i][0] = 0.0;TelePos[i][1] = 0.0;
						}
						else
						{
							SetPlayerPos(i,plocx,plocy+2, plocz);
						}
						SetPlayerInterior(playerid,GetPlayerInterior(plo));
						SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(plo));
                    	SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ai fost teleportat!");
                    	GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
		                GetPlayerName(playerid, numewarning, sizeof(numewarning));
		                format(string, sizeof(string), "[AdmWarning]: %s s-a teleportat la %s.",numewarning,giveplayer);
		                ABroadCast(COLOR_LIGHTRED,string, 5);
					}
					else
					{
						SendClientMessage(playerid, COLOR_GRAD1, "   Nu ai acces la aceasta comanda!");
					}
				}
			}
			else
			{
				format(string, sizeof(string), "   %d Nu este un player activ.", plo);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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.