SA-MP Forums Archive
Checkpoint help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoint help (/showthread.php?tid=113926)



Checkpoint help - Lajko1 - 16.12.2009

Hello guys i need help with checkpoint i am using Dragsta cp streamer (ty to Dragsta) but i made:

-1 Cp for entering LSPD
-1 Cp For Exiting LSPD
-1 Cp inside LSPD for buying items like tazer,donut,arrmor ...

but first when i spawn it all looks ok , when i go to LSPD doors for enter i see CP , i can enter but there is no CP for buying items,i see exiting CP too but when i exit,CP for ENTERING LSPD Gone , wtf ? any help ? i can post code too if u want


Re: Checkpoint help - Lajko1 - 16.12.2009

so anyone ? if u need part of code just say me... cuz i dont know where should be problem and i dont know what to post what part of code , if u know just say what should i post u and i will


Re: Checkpoint help - Retardedwolf - 16.12.2009

I don't really understand what you mean?

At least show the code without others having to wait to help.

CheckGrammar();


Re: Checkpoint help - miokie - 16.12.2009

Show the checkpoint lines...


Re: Checkpoint help - Lajko1 - 17.12.2009

oky here are those lines

Top of script

Код:
#include <cps>
OnGameModeInit

Код:
CopSaleCP = CreateCheckpoint(-1, 249.3528,67.7806,1003.6406, 1.0, 5.0);
	
	LSPDENTER = CreateCheckpoint(-1, 1553.9095,-1675.5181,16.1953, 2.0, 20.0);
	LSPDEXIT = CreateCheckpoint(-1, 246.7626,63.2951,1003.6406, 2.0, 5.0);
than i have as dragsta say on player connect , gamemode init and onplayer enter checkpoint some functions:

on game mode init

Код:
StartSystem();
OnPlayerConnect

Код:
ClearVars(playerid);
  SyncCheckpoints(playerid);
and on player enter the checkpoint

Код:
CheckpointCheck(playerid);
So here is script when palyer enter in STREAMED checkpoint:

Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
	if(streamid == CopSaleCP)
	{
	if(gTeam[playerid] != TEAM_COP)
	{
	SendClientMessage(playerid,0xFF9900AA,"Nothing For You Here Sir!");
	return 1;
	}
	new string2[256];
	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
	format(string2,sizeof string2,"Welcome Officer %s ! Anything for You ?",playername);
	new listitems[] = "Tazer                        $355\nDonut                        $30\nShotgun                      $150\nArrmor                        $100";
	ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,string2,listitems,"Buy","Cancel");
	return 1;
	}
	if(streamid == LSPDENTER)
	{
	SetPlayerInterior(playerid,6);
	SetPlayerPos(playerid,246.7011,65.7503,1003.6406);
	SetPlayerFacingAngle(playerid,2.6751);
	SendClientMessage(playerid,0x33CCFFAA,"Welcome To Los Santos Police Department!");
	return 1;
	}
	if(streamid == LSPDEXIT)
	{
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,1551.8656,-1675.6353,16.0384);
	SetPlayerFacingAngle(playerid,92.1443);
	return 1;
	}
	return 1;
}
so as i say first i see the entering to LSPD cp i see him first time,i enter the CP for entering LSPD... in LSPD i dont see my maded CP ''CopSale'', but i see Exiting LSPD CP so i can exit and when i exit LSPD i dont see LSPDENTER CP ... so i cant enter and really crap, i hope u can help me now and u understand what the ''explaintation about problem''

Ty for any help


Re: Checkpoint help - Lajko1 - 17.12.2009

anyone ?


Re: Checkpoint help - WillyP - 26.07.2010

pawn Код:
if(streamid == CopSaleCP)
    {
    if(gTeam[playerid] != TEAM_COP)
    {
    SendClientMessage(playerid,0xFF9900AA,"Nothing For You Here Sir!");
    return 1;
    }
    new string2[256];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
    format(string2,sizeof string2,"Welcome Officer %s ! Anything for You ?",playername);
    new listitems[] = "Tazer                        $355\nDonut                        $30\nShotgun                      $150\nArrmor                        $100";
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,string2,listitems,"Buy","Cancel");
    return 1;
    }
maybe this part:


pawn Код:
{
    if(gTeam[playerid] != TEAM_COP)
    {
    SendClientMessage(playerid,0xFF9900AA,"Nothing For You Here Sir!");
    return 1;
    }
should be civilian


Re: Checkpoint help - Kar - 26.07.2010

no. its ur draw distance. also set the cp interior