SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 11/08/2008, 08:22 AM   #1
domidom
Big Clucker
 
Join Date: Feb 2007
Posts: 177
Reputation: 15
Default [INC] CPS - CheckPoint Streamer by DragSta

CPS V0.3
by DragSta
_________________________________________________

What is it?
CPS is a simple, easy to use, and efficient checkpoint streamer.

Need some help?
Check out This Wiki Entry made by Mike.

What can I do with it?
The native checkpoint limit in SA-MP is one, meaning only one can be displayed at a time. This streamer (like all the other streamers) will only display the checkpoint closest to the player.

How do I use it?
It is very simple:
1. Download the .inc file from one of the links below
2. Put the .inc file in your 'includes' directory.
3. Include it into your GM/FS with '#include <cps>'
4. Make the following additions to your script:
1. Add 'StartSystem();' to OnGameModeInit/OnFilterScriptInit.
2. Add 'ClearVars(playerid);' to OnPlayerConnect.
3. Add 'SyncCheckpoints(playerid);' to OnPlayerConnect.
4. Add 'CheckpointCheck(playerid);' to the TOP of OnPlayerEnterCheckpoint.
5. Add the following callback to your script:
pawn Code:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
  return 1;
}

5. You can now use the following functions:
pawn Code:
CreateCheckpoint(playerid, Float:cpX, Float:cpY, Float:cpZ, Float:cpS, Float:viewdiss); //Will create a streamed checkpoint for the specified player. Use -1 as playerid for all players
DestroyCheckpoint(cPid); //Destroys a checkpoint.
TogglePlayerCheckpoint(playerid, cpid, bool:toggle); //Toggles a checkpoint on/off for a player.

Download!
http://sampnet.co.uk/files/cpsinc.zip

Mirrors not accepted.

Everything is quite self explanitory, but if theres something you cant figure out, dont hesitate to ask
If you find any bugs or have any suggestions, please post

Thanks,
DragSta
domidom is offline   Reply With Quote
Old 11/08/2008, 01:13 PM   #2
kc
Gangsta
 
kc's Avatar
 
Join Date: Aug 2007
Posts: 618
Reputation: 115
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

ooh, nice work dragsta
kc is offline   Reply With Quote
Old 11/08/2008, 01:18 PM   #3
OrlGiNS
Big Clucker
 
Join Date: Feb 2008
Posts: 98
Reputation: 8
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

wow
cool dragsta,
i was about to asking for this

:P
OrlGiNS is offline   Reply With Quote
Old 11/08/2008, 03:33 PM   #4
whooper
Huge Clucker
 
whooper's Avatar
 
Join Date: Jul 2007
Location: hobox
Posts: 367
Reputation: 22
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

ty Dragsta
__________________
whooper is offline   Reply With Quote
Old 11/08/2008, 03:43 PM   #5
domidom
Big Clucker
 
Join Date: Feb 2007
Posts: 177
Reputation: 15
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

New version out.
Cueball mentioned this in IRC and I decided he was right so I put it in.
CreateCheckpoint now has a playerid parameter. This means that the checkpoint will only be created for the playerid specified. To create a checkpoint for all players, use -1 as the playerid.

Also, a new function has been added: TogglePlayerCheckpoint(playerid, cpid, bool:toggle)
First post edited, Download links are the same.
domidom is offline   Reply With Quote
Old 15/08/2008, 02:14 AM   #6
almighty
Big Clucker
 
Join Date: Aug 2007
Posts: 121
Reputation: 0
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

C:\Documents and Settings\Walter\Escritorio\The.Sims.2.Nightlife.PC .2CDs.Multilenguaje.www.GameDonkey.net\SampS2.2R3\ pawno\include\cps.inc(129) : warning 208: function with tag result used before definition, forcing reparse
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
i get this warning xD what does it means?
__________________
"This... is the way the world ends..." - "May Talos Guide You" - "Close Shut the Jaws... Of Oblivion!" - "Revelation 2:16, I am Alpha and Omega, The Beginning and the end. I Will give unto him that is athirs from the fountain of water of life freely" - "Death its a preferable alternative to Comunism" - "Embrace Democracy or you will be eradicated!"
almighty is offline   Reply With Quote
Old 15/08/2008, 10:49 AM   #7
OrlGiNS
Big Clucker
 
Join Date: Feb 2008
Posts: 98
Reputation: 8
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

Quote:
Originally Posted by almighty
C:\Documents and Settings\Walter\Escritorio\The.Sims.2.Nightlife.PC .2CDs.Multilenguaje.www.GameDonkey.net\SampS2.2R3\ pawno\include\cps.inc(129) : warning 208: function with tag result used before definition, forcing reparse
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
i get this warning xD what does it means?
i'm having exactly the same problem
OrlGiNS is offline   Reply With Quote
Old 15/08/2008, 12:28 PM   #8
almighty
Big Clucker
 
Join Date: Aug 2007
Posts: 121
Reputation: 0
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

But does the streamer works fine??
__________________
"This... is the way the world ends..." - "May Talos Guide You" - "Close Shut the Jaws... Of Oblivion!" - "Revelation 2:16, I am Alpha and Omega, The Beginning and the end. I Will give unto him that is athirs from the fountain of water of life freely" - "Death its a preferable alternative to Comunism" - "Embrace Democracy or you will be eradicated!"
almighty is offline   Reply With Quote
Old 15/08/2008, 09:59 PM   #9
[Jay]
Big Clucker
 
Join Date: Aug 2008
Posts: 84
Reputation: 0
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

Great Work
[Jay] is offline   Reply With Quote
Old 12/09/2008, 07:52 PM   #10
Mikep
High-roller
 
Join Date: Apr 2008
Posts: 1,042
Reputation: 2
Default Re: [INC] CPS - CheckPoint Streamer by DragSta

Question: How do i know what checkpoint like, what the CPId is?

EDIT: Can someone make an example FS with MORE THAN ONE checkpoint please? Im stuck.

All i bloody get is:

Code:
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\cps.inc(129) : warning 208: function with tag result used before definition, forcing reparse
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\cps.inc(129) : warning 219: local variable "x2" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\cps.inc(129) : warning 219: local variable "y2" shadows a variable at a preceding level
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\cps.inc(129) : warning 219: local variable "z2" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6420) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6420) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6420) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6422) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6425) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6425) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6425) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6420) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6420) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6420) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6437) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6437) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6437) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6439) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6442) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6442) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6442) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6437) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6437) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6437) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6479) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6479) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6479) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6481) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6484) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6484) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6484) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6479) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6479) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6479) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6496) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6496) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6496) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6498) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6501) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6501) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6501) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6496) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6496) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6496) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6513) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6513) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6513) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6515) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6518) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6518) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6518) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6513) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6513) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6513) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6530) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6530) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6530) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6532) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6535) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6535) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6535) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6530) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6530) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6530) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6547) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6547) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6547) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6549) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6552) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6552) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6552) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6547) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6547) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(6547) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7236) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7236) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7236) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7238) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7241) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7241) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7241) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7236) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7236) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7236) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7252) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7252) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7252) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7254) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7257) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7257) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7257) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7252) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7252) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7252) : warning 203: symbol is never used: "X"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7267) : warning 219: local variable "X" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7267) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7267) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7268) : error 035: argument type mismatch (argument 2)
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7270) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7270) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7270) : warning 213: tag mismatch
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7267) : warning 203: symbol is never used: "Z"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7267) : warning 203: symbol is never used: "Y"
C:\DOCUME~1\ADMINI~1\Desktop\FRSDM.pwn(7267) : warning 203: symbol is never used: "X"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.
Mikep is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC]YCP - Yaheli's Checkpoint Streamer - OnPlayerUpdate CP Streamer! Yaheli_Faro Includes 46 20/04/2010 03:53 PM
A checkpoint streamer? Naxix Help Archive 2 13/04/2010 08:41 PM
Could i do this with checkpoint streamer? Torran Help Archive 1 12/04/2010 11:43 AM
Best Checkpoint Streamer Torran Help Archive 2 20/02/2010 11:26 PM
Checkpoint Streamer cAMo Help Archive 2 17/01/2010 05:02 PM


All times are GMT. The time now is 10:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.