help....
#1

ok so i got this

Код:
#include <a_samp>

#define FILTERSCRIPT

#pragma tabsize 0

#if defined FILTERSCRIPT

new Menu:teleportmenu;

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" nothing");
	print("--------------------------------------\n");

    teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(teleportmenu, 0, "LS");
	AddMenuItem(teleportmenu, 0, "LS");
	AddMenuItem(teleportmenu, 0, "SF");
	AddMenuItem(teleportmenu, 0, "SF");
	AddMenuItem(teleportmenu, 0, "LV");
	AddMenuItem(teleportmenu, 0, "LV");
	AddMenuItem(teleportmenu, 1, "Grove Street");
	AddMenuItem(teleportmenu, 1, "Starfish Tower");
	AddMenuItem(teleportmenu, 1, "Wheel Arch Angels");
	AddMenuItem(teleportmenu, 1, "Jizzys");
	AddMenuItem(teleportmenu, 1, "4 Dragons");
	AddMenuItem(teleportmenu, 1, "Come-a-Lot");
	return 1;
}

#else

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/teleport", cmdtext, true, 10) == 0)
	{
		ShowMenuForPlayer(teleportmenu, playerid);
		return 1;
	}
	return 0;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    if(CurrentMenu == teleportmenu)
{
    switch(row)
    {
        case 0: //Grove Street
        {
            SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382);
            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!");
        }
    }
}
	return 1;
}
but have error like this:

Код HTML:
C:\Documents and Settings\vlado\Desktop\sa-mp\filterscripts\tele3.pwn(49) : error 017: undefined symbol "CurrentMenu"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
can someone help me and tell me what is the problem ?
Reply
#2

you dont need #else #endif ...
Reply
#3

if i dont have that will have much errors
Reply
#4

will writing like this:

Код HTML:
C:\Documents and Settings\vlado\Desktop\sa-mp\filterscripts\tele3.pwn(46) : error 017: undefined symbol "CurrentMenu"
C:\Documents and Settings\vlado\Desktop\sa-mp\filterscripts\tele3.pwn(90) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
:S
Reply
#5

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

#pragma tabsize 0

#define FILTERSCRIPT
main()
{
    print("\n--------------------------------------");
    print(" nothing");
    print("--------------------------------------\n");
}
#endif
new Menu:Teleportmenu;
public OnFilterScriptInit()
{
    Teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(Teleportmenu, 0, "LS");
    AddMenuItem(Teleportmenu, 0, "LS");
    AddMenuItem(Teleportmenu, 0, "SF");
    AddMenuItem(Teleportmenu, 0, "SF");
    AddMenuItem(Teleportmenu, 0, "LV");
    AddMenuItem(Teleportmenu, 0, "LV");
    AddMenuItem(Teleportmenu, 1, "Grove Street");
    AddMenuItem(Teleportmenu, 1, "Starfish Tower");
    AddMenuItem(Teleportmenu, 1, "Wheel Arch Angels");
    AddMenuItem(Teleportmenu, 1, "Jizzys");
    AddMenuItem(Teleportmenu, 1, "4 Dragons");
    AddMenuItem(Teleportmenu, 1, "Come-a-Lot");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/teleport", cmdtext, true, 10) == 0)
    {
        ShowMenuForPlayer(Teleportmenu, playerid);
        return 1;
    }
    return 0;
}
new CurrentMenu;
public OnPlayerSelectedMenuRow(playerid, row)
{
    CurrentMenu = GetPlayerMenu(playerid);
    if(CurrentMenu == Teleportmenu)
    {
    switch(row)
    {
        case 0: //Grove Street
        {
            SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382);
            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!");
        }
    }
}
    return 1;
}
only warning now but you can fix yourself
Reply
#6

can't warnings:

Код HTML:
C:\Documents and Settings\vlado\Desktop\sa-mp\filterscripts\tele3.pwn(46) : warning 213: tag mismatch
C:\Documents and Settings\vlado\Desktop\sa-mp\filterscripts\tele3.pwn(47) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#7

ehh ok thanks
Reply
#8

the script work to ..
Reply
#9

ehh ok dude but if i want to make just admin to teleport in the last line of teleports what to do ??
Reply
#10

u mean this
pawn Код:
case 5: //Com-a-Lot
        {
            if(IsPlayerAdmin(playerid))
            {
            SetPlayerPos(playerid, 2169.1838, 1122.5426, 12.6107);
            SetPlayerInterior(playerid, 0);
            SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Come-a-Lot casino!");
            }else{
            SendClientMessage(playerid, 0xFFFFFFFF, "you are not admin");
        }
    }
?? no tested
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)