Why isn't this working ?
#1

Hi there!

Just wondering what the issue was with this

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerWantedLevel(playerid) >= 1)
	}
    SetPlayerWantedLevel(playerid, 0);
    SetPlayerInterior(playerid, 10);
    SetPlayerPos(playerid,263.9106,77.6354,1001.0391);
	{
	else
	}
    SendClientMessage(playerid, 0xFFFF00C8, "- - - - Los Santos Police Department - - - - ");
    SendClientMessage(playerid, 0x80404000, "This is where criminals hand them selfs in");
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}
Doesn't seem to be working.
Reply
#2

Quote:
Originally Posted by LukeTheMajor
Посмотреть сообщение
Hi there!

Just wondering what the issue was with this

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerWantedLevel(playerid) >= 1)
	}
    SetPlayerWantedLevel(playerid, 0);
    SetPlayerInterior(playerid, 10);
    SetPlayerPos(playerid,263.9106,77.6354,1001.0391);
	{
	else
	}
    SendClientMessage(playerid, 0xFFFF00C8, "- - - - Los Santos Police Department - - - - ");
    SendClientMessage(playerid, 0x80404000, "This is where criminals hand them selfs in");
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}
Doesn't seem to be working.
Your brackets

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerWantedLevel(playerid) >= 1)
	{
    SetPlayerWantedLevel(playerid, 0);
    SetPlayerInterior(playerid, 10);
    SetPlayerPos(playerid,263.9106,77.6354,1001.0391);
	}
	else
	{
    SendClientMessage(playerid, 0xFFFF00C8, "- - - - Los Santos Police Department - - - - ");
    SendClientMessage(playerid, 0x80404000, "This is where criminals hand them selfs in");
	return 1;
       }
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}
Reply
#3

Thank you,

Do you know what would be causing this though ?

function "OnPlayerEnterCheckpoint" should return a value

It is something to do with that code because it was fine before I added it earlier
Reply
#4

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerWantedLevel(playerid) >= 1)
    {
        SetPlayerWantedLevel(playerid, 0);
        SetPlayerInterior(playerid, 10);
        SetPlayerPos(playerid,263.9106,77.6354,1001.0391);
    }
    else
    {
        SendClientMessage(playerid, 0xFFFF00C8, "- - - - Los Santos Police Department - - - - ");
        SendClientMessage(playerid, 0x80404000, "This is where criminals hand them selfs in");
    }
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}
Your mistakes is on the usage of { and }
Reply
#5

Quote:
Originally Posted by IceMeteor
Посмотреть сообщение
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerWantedLevel(playerid) >= 1)
    {
        SetPlayerWantedLevel(playerid, 0);
        SetPlayerInterior(playerid, 10);
        SetPlayerPos(playerid,263.9106,77.6354,1001.0391);
    }
    else
    {
        SendClientMessage(playerid, 0xFFFF00C8, "- - - - Los Santos Police Department - - - - ");
        SendClientMessage(playerid, 0x80404000, "This is where criminals hand them selfs in");
    }
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}
Your mistakes is on the usage of { and }
Ahh,

Hi there that works ! great thank you mate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)