Help in checkpoint
#1

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnFilterScriptExit()
{
    return 1;
}

public OnGameModeInit()
{
    AddStaticPickup(1318, 1, 1172.0773,-1323.4209,15.4032,89.4566, -1);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/enter", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.0773,-1323.4209,15.4032,89.4566))
        {
            SetPlayerPos(playerid, -204.5060,-1736.0486,675.7687);//HospitalEntrance
            SetPlayerInterior(playerid, 1);
        }
    }
    if(!strcmp(cmdtext, "/exit", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -204.5060,-1736.0486,675.7687))
        {
            SetPlayerPos(playerid, 1172.0773,-1323.4209,15.4032,89.4566);//HospitalExit
            SetPlayerInterior(playerid, 0);
        }
    }
    return 1;
}
--------------------------

I get these warnings:

\HospitalCheckpoint.pwn(32) : warning 213: tag mismatch
\filterscripts\HospitalCheckpoint.pwn(32) : warning 202: number of arguments does not match definition
\filterscripts\HospitalCheckpoint.pwn(40) : warning 202: number of arguments does not match definition
\filterscripts\HospitalCheckpoint.pwn(50) : warning 202: number of arguments does not match definition


can someone help me pls
Reply
#2

pawn Код:
AddStaticPickup(1318, 1, 1172.0773,-1323.4209,15.4032,89.4566, -1);
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.0773,-1323.4209,15.4032,89.4566))
SetPlayerPos(playerid, 1172.0773,-1323.4209,15.4032,89.4566);/
You have 4 parameters in those lines, X Y Z and the angle, remove this last one.
Reply
#3

pawn Код:
\filterscripts\HospitalCheckpoint.pwn(32) : warning 213: tag mismatch
\filterscripts\HospitalCheckpoint.pwn(32) : warning 202: number of arguments does not match definition
My script now looks like:

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnFilterScriptExit()
{
    return 1;
}

public OnGameModeInit()
{
    AddStaticPickup(1318, 1, 1172.0773,-1323.4209,15.4032,89.4566, -1);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/enter", true))
    {
        {
            SetPlayerPos(playerid, -204.5060,-1736.0486,675.7687);//HospitalEntrance
            SetPlayerInterior(playerid, 1);
        }
    }
    if(!strcmp(cmdtext, "/exit", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -204.5060,-1736.0486,675.7687))
        {
            SetPlayerInterior(playerid, 0);
        }
    }
    return 1;
}
2 warnings the ones that i written before this; help
Reply
#4

pawn Код:
AddStaticPickup(1318, 1, 1172.0773,-1323.4209,15.4032,89.4566, -1);
Still have the angle there, you only have to remove one of the extra parameters, not the full line. In this case, in all the lines I stated, you have to remove the 89.4566 value, as it is the angle of the player.

Same happened in the other lines, don't remove the full line, just that value.
Reply
#5

Edited:

Found a small prob:

The script works fine but now when i try /enter it doesn't go in:

Script:

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnFilterScriptExit()
{
    return 1;
}

public OnGameModeInit()
{
    AddStaticPickup(1318, 1, 1172.0773,-1323.4209,15.4032, -1);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/enter", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.0773,-1323.4209,15.4032))
        {
            SetPlayerPos(playerid, -1323.4209,15.4032,89.4566);//HospitalEntrance
            SetPlayerInterior(playerid, 1);
        }
    }
    if(!strcmp(cmdtext, "/exit", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -1323.4209,15.4032,89.4566))
        {
            SetPlayerPos(playerid, 1172.0773,-1323.4209,15.4032);//HospitalExit
            SetPlayerInterior(playerid, 0);
        }
    }
    return 1;
}
help pls if you can
Reply
#6

help pls
Reply
#7

help plssss
Reply
#8

pls helpppp
Reply
#9

Bobby please do not spam your topic
Reply
#10

BUMPY ride
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)