Jump to content

Cum transform asta in zcmd


Sebi wepos

Recommended Posts

cum pot transforma comanda asta:

if (strcmp("/deschidegate", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsPlayerInRangeOfPoint(playerid,15, 1587.8665, -1637.9141, 14.8116))
		    {
		            MoveDynamicObject(poarta,1587.8665, -1637.9141, 9.7766, 5.0, 0.0000, 0.0000, 0.0000);
		            SetTimer("MoveInitialPoarta",5000,0);
		            SendClientMessage(playerid,-1,"Ai deschis poarta 5 secunde!");
		    }
		    else
		        return SendClientMessage(playerid,-1,"Nu esti langa poarta!");
		}
	        
		return 1;
	}

in zcmd gen cmd:deschidegate

Link to comment
Share on other sites

CMD:deschidegate(playerid,params[])
{
	if(!IsPlayerConnected(playerid))
		return 1;

	if(!IsPlayerInRangeOfPoint(playerid,15, 1587.8665, -1637.9141, 14.8116))
		return SendClientMessage(playerid,-1,"Nu esti langa poarta!");

	MoveDynamicObject(poarta,1587.8665, -1637.9141, 9.7766, 5.0, 0.0000, 0.0000, 0.0000);
    SetTimer("MoveInitialPoarta",5000,0);
    SendClientMessage(playerid,-1,"Ai deschis poarta 5 secunde!");
	return 1;
}

 

  • Upvote 1
public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

CMD:deschidegate(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerInRangeOfPoint(playerid,15, 1587.8665, -1637.9141, 14.8116))
        {
            MoveDynamicObject(poarta,1587.8665, -1637.9141, 9.7766, 5.0, 0.0000, 0.0000, 0.0000);
            SetTimer("MoveInitialPoarta",5000,0);
            SendClientMessage(playerid,-1,"Ai deschis poarta 5 secunde!");
        }
        else
        return SendClientMessage(playerid,-1,"Nu esti langa poarta!");
    }
    return 1;
}

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.