Jump to content
  • 0

Problema comenzi


AndrewTG01

Question

Problema intalnita (descriere): Am incercat sa fac un sistem de event, dau startevent si dupa cand dau /gotoevent nu ma da unde a dat acel player startevent ma da la coordonatele 0.0,0.0,0.0
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): 
if (strcmp("/startevent", cmdtext, true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] <= 1)
		{
			if(Event[playerid] == 0)
			{
				new string[128], name[MAX_PLAYER_NAME];
				new Float: X, Float: Y, Float: Z;
				for(new i = 0; i < MAX_PLAYERS; i ++)
				{
				    Event[i] = 1;
				    EventTeleport[i] = 1;
				}
				GetPlayerName(playerid, name, sizeof(name));
				format(string, sizeof(string), "AdmInfo: %s a dat drumul la un event! Tasteaza /gotoevent ca sa participi si tu!", name);
				SendClientMessageToAll(COLOR_LIGHTRED, string);
				GetPlayerPos(playerid, X, Y, Z);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Un event este in desfasurare!");
			}
		}
	}

if (strcmp("/gotoevent", cmdtext, true) == 0)
	{
		if(Event[playerid] == 1)
		{
			if(EventTeleport[playerid] == 1)
			{
                new Float: X, Float: Y, Float: Z;
                SetPlayerPos(playerid, X, Y, Z);
		        SetPlayerFacingAngle(playerid, posA[playerid]);
			}
			else
			{
                SendClientMessage(playerid, COLOR_GRAD2, "Teleport-ul la event este oprit!");
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD2, "Nu este nici un event in desfasurare!");
		}
	}

Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: da
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.