WIERD !!! O_O
#1

guys again me i add the checkpoint with guns but now when i make player teleport why cant 2 teleports !!! o_0

look:

Код HTML:
#include <a_samp>
public OnPlayerSpawn(playerid)
{
	SetPlayerCheckpoint(playerid, 1868.1732177734, -2400.8947753906, 13.554688453674, 1.0);
	SetPlayerCheckpoint(playerid, 1498.3623046875, -1584.3095703125, 13.546875, 3.0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    SendClientMessage(playerid, 0xDEEE20FF, "Welcome in DM Area!!!");
    SetPlayerPos(playerid, 1815.0653076172, -2434.2470703125, 13.582302093506);
    SetPlayerPos(playerid, -2879.232421875, 455.79675292969, 4.8951416015625);
    return 1;
}
and the other checkpoint i cant show... what is the PROBLEM !!!!!!
Reply
#2

pawn Код:
new CPstatus[MAX_PLAYERS]=0;

public OnPlayerSpawn(playerid)
{
CPstatus[playerid] = 1;
SetPlayerCheckpoint(playerid, 1868.1732177734, -2400.8947753906, 13.554688453674, 1.0);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    SendClientMessage(playerid, 0xDEEE20FF, "Welcome in DM Area!!!");
if(CPstatus[playerid] ==1)
{    
SetPlayerPos(playerid, 1815.0653076172, -2434.2470703125, 13.582302093506);
SetPlayerCheckpoint(playerid, 1498.3623046875, -1584.3095703125, 13.546875, 3.0);
CPstatus[playerid]=2;
}
else if(CPstatus[playerid] == 2)
{
    SetPlayerPos(playerid, -2879.232421875, 455.79675292969, 4.8951416015625);
}
    return 1;
}
Just an example, I'm sure you know how to do the rest :P
Reply
#3

wrong................... multiple spawn
Reply
#4

You can have only One CheckPoint. use streamer
Reply
#5

where to find that streamer
Reply
#6

ehh and i forgoted...

When player will enter in checkpoint how to show list of some places where to teleport ?
I think i will make DM/STUNT/RACE server and i need this please help.
Thanks.
Reply
#7

https://sampwiki.blast.hk/wiki/Creating_a_simple_Menu
Reply
#8

ok so i got this and i dont know where to put the coordinates where player to teleport on clicking one line of the list.

Код:
// Test menu functionality filterscipt

#include <a_samp>

#define TEST_MENU_ITEMS 6

new Menu:TestMenu;
new TestMenuStrings[5][16] = {"DM Area", "Race Area", "Stunt Area", "Relax Area", "Admin Area"};

HandleTestMenuSelection(playerid, row)
{
	new s[256];

	if(row < TEST_MENU_ITEMS) {
		format(s,256,"You selected item %s",TestMenuStrings[row]);
		SendClientMessage(playerid,0xFFFFFFFF,s);
	}
}

InitTestMenu()
{
	TestMenu = CreateMenu("Test Menu", 1, 200.0, 150.0, 200.0, 200.0);

	for(new x=0; x < TEST_MENU_ITEMS; x++) {
    	        AddMenuItem(TestMenu, 0, TestMenuStrings[x]);
	}
}

public OnFilterScriptInit()
{
   	InitTestMenu();
}

public OnPlayerSelectedMenuRow(playerid, row)
{
        new Menu:PlayerMenu = GetPlayerMenu(playerid);

        if(PlayerMenu == TestMenu) {
	     HandleTestMenuSelection(playerid, row);
	}
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/teleport", true))	{
    	     ShowMenuForPlayer(TestMenu, playerid);
    	     return 1;
	}
	return 0;
}
please help
Reply
#9

The link I gave you explains this. The cases describes the actions to do when you select a menu row, so if you select the first menu row, case 0 will be taken.
pawn Код:
if(CurrentMenu == teleportmenu)
{
    switch(row)
    {
        case 0: //Grove Street //First row
        {
            SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382);// These are the actions which will be taken when you select the first row.
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to Grove Street");
        }
        case 1: //Starfish Tower
        {
            SetPlayerPos(playerid, 1541.2833, -1362.4741, 329.6457);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the top of Starfish Tower");
        }
        case 2: //Wheel Arch Angels
        {
            SetPlayerPos(playerid, -2705.5503, 206.1621, 4.1797);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Wheel Arch Angels tuning-shop");
        }
        case 3: //Jizzys
        {
            SetPlayerPos(playerid, -2617.5156, 1390.6353, 7.1105);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to Jizzy's Nightclub!");
        }
        case 4: //4Dragons
        {
            SetPlayerPos(playerid, 2028.5538, 1008.3543, 10.8203);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Four Dragons Casino");
        }
        case 5: //Com-a-Lot
        {
            SetPlayerPos(playerid, 2169.1838, 1122.5426, 12.6107);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Come-a-Lot casino!");
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)