How do I add more then one teleport in a .pwn file?
#8

To add more teleport commands just do the same thing except different command name also a different SetPlayerPosition

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/cia", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 100.7311,1920.8513,18.2811);
        return 1;
    }
    if (strcmp("/prison", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, -1189.0684,-964.0616,129.2119);
        return 1;
    }
    if(strcmp("/TeleportAreacommanTextHere", cmdtext, true, 10) == 0)
    {
         SetPlayerPos(playerid, X, Y, Z);
         return 1;
    }
    return 0;
}
Just use the TeleportcommandTexthere and add in X,Y,Z coordinations also the Commandtext then you should be done. I would much prefer ZCMD though as it is a faster processor. If you want them in ZCMD let me know and post here
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)