Show CP after CP
#1

pawn Код:
public OnPlayerEnterDynamicCP(playeird, checkpointid)
{
    if(checkpointid == CheckpointDriver[0]) // Checks if the checkpointid equals to Checkpoint[0]
    {
        SCM(playerid, -1, "Good job!");
    }
    if(checkpointid == CheckpointDriver[1]) // Checks if the checkpointid equals to Checkpoint[1]
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[1]\"");
        GivePlayerMoney(playerid, + 200);
    }
    return 1;
}
How can i show [1], if I entered 0?
Reply
#2

PHP код:
new Checkpoint[MAX_PLAYERS];
public 
OnPlayerEnterDynamicCP(playeirdcheckpointid)
{
    
    if(
checkpointid == CheckpointDriver[0]) // Checks if the checkpointid equals to Checkpoint[0]
    

        if(
Checkpoint[playerid] == 0)
        {
        
SCM(playerid, -1"Good job!");
        
Checkpoint[playerid] = 1;
        
ShowPlayerCP............. // line that showing a CheckpointDriver[1]
        
}  
    }
    if(
checkpointid == CheckpointDriver[1]) // Checks if the checkpointid equals to Checkpoint[1]
    
{
        if(
Checkpoint[playerid] == 1)
        {
        
SendClientMessage(playerid0xFFFFFFFF"This is \"Checkpoint[1]\"");
        
GivePlayerMoney(playerid, + 200);
        }
    }
    return 
1;

I'm no good at Checkpoints, but it should work
Reply
#3

Don't quite know what you were asking for, but here is my go at it, although it is manual, tell me if you don't want it manual.

Код HTML:
public OnPlayerEnterDynamicCP(playeird, checkpointid)
{
    if(checkpointid == Checkpoint[0]) // Checks if the checkpointid equals to Checkpoint[0]
    {   
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[0]\"");
        /*

        GivePlayerMoney(playerid, + 100);
    }
    if(checkpointid == Checkpoint[1]) // Checks if the checkpointid equals to Checkpoint[1]
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[1]\"");
        GivePlayerMoney(playerid, + 200);
        SetPlayerCheckpoint(playerid, xcoords,ycoords,zcoords, 3.0); // Manual way to set the players checkpoint
   
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by ZachKnoxx
Посмотреть сообщение
Don't quite know what you were asking for, but here is my go at it, although it is manual, tell me if you don't want it manual.

Код HTML:
public OnPlayerEnterDynamicCP(playeird, checkpointid)
{
    if(checkpointid == Checkpoint[0]) // Checks if the checkpointid equals to Checkpoint[0]
    {   
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[0]\"");
        /*

        GivePlayerMoney(playerid, + 100);
    }
    if(checkpointid == Checkpoint[1]) // Checks if the checkpointid equals to Checkpoint[1]
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[1]\"");
        GivePlayerMoney(playerid, + 200);
        SetPlayerCheckpoint(playerid, xcoords,ycoords,zcoords, 3.0); // Manual way to set the players checkpoint
   
    }
    return 1;
}
I think that's sort of Car License system then follow one by one Checkpoints and finally obtain a license
in this case when player enter in first Checkpoint[0] shows Checkpoint[1] on map and after enter in [1] to give a Reward
Reply
#5

Yea like He enters [0], [1], [2], Later and on the end a license How to show CP after CP?
Reply
#6

I gave you the example above
Reply
#7

pawn Код:
public OnPlayerEnterDynamicCP(playeird, checkpointid) //278
{

    if(checkpointid == CheckpointDriver[0]) // Checks if the checkpointid equals to Checkpoint[0]
    {
        if(Checkpoint[playerid] == 0)
        {
        SCM(playerid, -1, "Good job!");
        Checkpoint[playerid] = 1;
        ShowPlayerCP(CheckpointDriver[1]); // line that showing a CheckpointDriver[1]
        }
    }
    if(checkpointid == CheckpointDriver[1]) // Checks if the checkpointid equals to Checkpoint[1]
    {
        if(Checkpoint[playerid] == 1)
        {
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[1]\"");
        GivePlayerMoney(playerid, + 200);
        }
    }
    return 1;
} //299

Errors:
Код:
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(278) : error 025: function heading differs from prototype
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(283) : error 017: undefined symbol "playerid"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(285) : error 017: undefined symbol "playerid"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(286) : error 017: undefined symbol "playerid"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(287) : error 017: undefined symbol "ShowPlayerCP"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(292) : error 017: undefined symbol "playerid"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(294) : error 017: undefined symbol "playerid"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(295) : error 017: undefined symbol "playerid"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(295) : warning 215: expression has no effect
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(295) : error 001: expected token: ";", but found ")"
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(295) : error 029: invalid expression, assumed zero
F:\Mustafa\Dutch-RealLife\gamemodes\Haci.pwn(295) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


11 Errors.
Reply
#8

Someone?
Reply
#9

*Sneeze?*
Reply
#10

Havent test it but try it

pawn Код:
public OnPlayerEnterDynamicCP(playeird, checkpointid)
{
    if(checkpointid == CheckpointDriver[0]) // Checks if the checkpointid equals to Checkpoint[0]
    {
        DestroyDynamicCP(CheckpointDriver[0]);
        SCM(playerid, -1, "Good job!");
        CreateDynamicCP(CheckpointDriver[1]......);
       
    }
    if(checkpointid == CheckpointDriver[1]) // Checks if the checkpointid equals to Checkpoint[1]
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "This is \"Checkpoint[1]\"");
        GivePlayerMoney(playerid, + 200);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)