Jump to content
  • 0

pomoc SetPlayerPos


stonersvojta

Dotaz

Zdravím, potřeboval bych pomoct, když si chci udělat nějaký port, tak to mám bez chyby, ale jak mám v pwn, napsat, když chcu dva warpy.
 
Příklad:

       

public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext,"/mitte",true))
    {
        SetPlayerPos(playerid,0.0,0.0,3.0);
        return 1;
    }
    return 0;
}
 
Toto je bez chyby, ale !:
 
 
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext,"/mitte",true))
    {
        SetPlayerPos(playerid,0.0,0.0,3.0);
        return 1;
    }
    return 0;
}
 
{
    if(!strcmp(cmdtext,"/mitte2",true))
    {
        SetPlayerPos(playerid,0.0,0.0,4.0);
        return 1;
    }
    return 0;
}

 

 

 

 

když chci třeba dva nebo více portů udělat za sebou, tak už mi to píše errory.

Prosím poraďte, jak mám udělat více portů.

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

 

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/mitte",true))
{
SetPlayerPos(playerid,0.0,0.0,3.0);
return 1;
}
if(!strcmp(cmdtext,"/mitte2",true))
{
SetPlayerPos(playerid,0.0,0.0,4.0);
return 1;
}
return 0;
}
Link to comment
Share on other sites

  • 0
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/mitte", true) == 0) return SetPlayerPos(playerid, 0.0, 0.0, 3.0);
if(strcmp(cmdtext, "/mitte2", true) == 0) return SetPlayerPos(playerid, 0.0, 0.0, 4.0);
return 0;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...