SA-MP Forums Archive
Help me in Float Checkpoints - 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)
+--- Thread: Help me in Float Checkpoints (/showthread.php?tid=571996)



Help me in Float Checkpoints - astanalol - 24.04.2015

Hello Guys
i want know how to make float checkpoints better Cuz i will adding for it money and killed and message
its 'Kidnap' script i made it better Help me please to make it better to can adding in this float timer and everythings i can adding it
help +reps
PHP код:
new Float:Kidnap[][3] =
{
    {
213.8458,1867.2299,13.1406},
    {
404.7588,2443.3687,16.5000},
    {
760.2078,381.6906,23.1719},
    {-
777.8541,1436.0165,13.7891}
}; 
i want made it better to can adding in it script please
want idea


Re: Help me in Float Checkpoints - BroZeus - 24.04.2015

It is not clear what you want. Use ****** translate to convert your language to english.


Re: Help me in Float Checkpoints - astanalol - 24.04.2015

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
It is not clear what you want. Use ****** translate to convert your language to english.
-_-
how to make money when he is in Checkpoints ? with this random checkpoints !!


Re: Help me in Float Checkpoints - Alpay0098 - 24.04.2015

You can use OnPlayerEnterCheckpoint. Check this out :
PHP код:
if(CP[playerid] == CHECKPOINT_JOB1)
{
    
GivePlayerMoney(playerid,2000);
    
PlayerInfo[playerid][pMoney] += 2000;
    
CP[playerid] = CHECKPOINT_NONE;
    
DisablePlayerCheckpoint(playerid);
    return 
1;

You can define CP[playerid] before like this : (This code is in OnPlayerEnterVehicle section)
PHP код:
if(IsTruckerCar(vehicleid))
{
    
CP[playerid] = CHECKPOINT_JOB1;
    
SetPlayerCheckpoint(playerid,1037.4570,-1105.8281,23.9771,4);

Good luck.
You decide 'bout Rep


Re: Help me in Float Checkpoints - astanalol - 24.04.2015

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
You can use OnPlayerEnterCheckpoint. Check this out :
PHP код:
if(CP[playerid] == CHECKPOINT_JOB1)
{
    
GivePlayerMoney(playerid,2000);
    
PlayerInfo[playerid][pMoney] += 2000;
    
CP[playerid] = CHECKPOINT_NONE;
    
DisablePlayerCheckpoint(playerid);
    return 
1;

You can define CP[playerid] before like this : (This code is in OnPlayerEnterVehicle section)
PHP код:
if(IsTruckerCar(vehicleid))
{
    
CP[playerid] = CHECKPOINT_JOB1;
    
SetPlayerCheckpoint(playerid,1037.4570,-1105.8281,23.9771,4);

Good luck.
You decide 'bout Rep
good but i still need random checkpoints with this 4 float
PHP код:
    {213.8458,1867.2299,13.1406},
    {
404.7588,2443.3687,16.5000},
    {
760.2078,381.6906,23.1719},
    {-
777.8541,1436.0165,13.7891



Re: Help me in Float Checkpoints - Alpay0098 - 24.04.2015

So you can use like this :
PHP код:
if(IsTruckerCar(vehicleid)) 

    
CP[playerid] = CHECKPOINT_JOB1
    new 
rand random(sizeof(Kidnap));
    
Checkpoint[playerid] = rand;
    
SetPlayerCheckpoint(playerid,Kidnap[rand][0],Kidnap[rand][0],Kidnap[rand][0],4); 

And define some codes for each checkpoint like this:
PHP код:
if(CP[playerid] == CHECKPOINT_JOB1

    
GivePlayerMoney(playerid,2000); 
    
PlayerInfo[playerid][pMoney] += 2000
    
CP[playerid] = CHECKPOINT_NONE
    
DisablePlayerCheckpoint(playerid); 
    return 
1

It would work.
Any questions?


Re: Help me in Float Checkpoints - Alpay0098 - 24.04.2015

I can fix them via TeamViewer but I'm not sure am I similiar with your GM or not. anyway we can test our chance.


Re: Help me in Float Checkpoints - astanalol - 24.04.2015

this my Script Kidnap
PHP код:
CMD:kidnap(playeridparams[])
{
    new 
targetid;
    if(
sscanf(params,"d",targetid)) return SendClientMessage(playerid0xFF0000FF"USAGE: /kidnap [id]");
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid0xFF0000FF"ERROR: You must be on vehicle!");
    if(
noexit[targetid] == 1noexit[targetid] = 0;
    
noexit[targetid] = 1;
    
PutPlayerInVehicle(targetidGetPlayerVehicleID(playerid), 1);
    new 
rand random(sizeof(Kidnapp));
    
SetPlayerPos(playeridKidnapp[rand][0], Kidnapp[rand][1], Kidnapp[rand][2]);
    
SendClientMessage(targetidCOLOR_RED"You Can Out /Cutrope");
    new 
String[128];
    
format(Stringsizeof(String), "You kidnapped %s"pName(targetid));
    
GameTextForPlayer(playeridString50002);
    
//for Victim:
    
format(Stringsizeof(String), "You kidnaped From %s"pName(playerid));
    
GameTextForPlayer(targetidString50002);
    return 
1;

this my checkpoints random float
PHP код:
new Float:Kidnapp[][3] =
{
    {
213.8458,1867.2299,13.1406},
    {
404.7588,2443.3687,16.5000},
    {
760.2078,381.6906,23.1719},
    {-
777.8541,1436.0165,13.7891}
}; 
How i can make my float better to i will add money for kiddnaper and death for kidnapped
PHP код:
SetPlayerHealth(targetid0);
GivePlayerMoney(playerid1000);
DisablePlayerCheckpoint(playerid); 
this i want adding it when player in the random checkpoints


Re: Help me in Float Checkpoints - Alpay0098 - 24.04.2015

I really don't know what do you mean.
This CMD that you gave, Kidnaps a player. It's while that you want to attach a checkpoint to ID, Am I right?
If I'm right so what's those cordinations in Float:Kidnapp?
These cordinations are static and player ID got a dynamic cordinations and it's not static. soooo I still didn't get your mean ... .
Can you explain from first that what CMD:Kidnap is going to exactly?


Re: Help me in Float Checkpoints - astanalol - 24.04.2015

Quote:
Originally Posted by Alpay0098
Посмотреть сообщение
I really don't know what do you mean.
This CMD that you gave, Kidnaps a player. It's while that you want to attach a checkpoint to ID, Am I right?
If I'm right so what's those cordinations in Float:Kidnapp?
These cordinations are static and player ID got a dynamic cordinations and it's not static. soooo I still didn't get your mean ... .
Can you explain from first that what CMD:Kidnap is going to exactly?
1.CMD:Kidnap = Get Player in Vehicles
2.Float i want it Better To When im in Checkpoints The Player [Die The Kiddnaped] And [Get Player 10k Money The Kiddnaper Player ]
that i want adding it but the float checkpoints bad cant adding somthings in it to its bad script
u know now what is my problems