How to do this?
#1

So, I got this:

pawn Код:
forward StuntCompleted(playerid);
public StuntCompleted(playerid)
{
    new stuntid = GetStuntID(playerid);
    for(new i=0; i<MAX_STUNTS; i++)
    {
        GivePlayerMoney(playerid, StuntMoney[i]);
        new str2[128];
        format(str2, sizeof(str2), "You have received %d dollars and %d score", StuntMoney[stuntid], StuntScore[stuntid]);
        SendClientMessage(playerid, c_y, str2);
        SetPlayerScore(playerid, (GetPlayerScore(playerid))+ StuntScore[stuntid]);
        TogglePlayerDynamicCP(playerid, StuntCheckpoint[stuntid], 0);
    }
    return 1;
}
The problem is, that if I use stuntid, that nothing happens, but if I use i, it happens on all the checkpoints, and I always get all the score and money that are defined.. So I only want that the checkpoint I entered goes away for only myself, and that I get the score and money that I defined.

Example:

pawn Код:
AddStunt(stuntid, Float:iconX, Float:iconY, Float:iconZ, Moneya, Scorea)

   AddStunt(0, 1303.040405,1291.831787,68.269271, 110,1); //stunt1
So, how to do that I only get the money and score for the checkpoint im standing in, and that the checkpoint disappears after that?
Reply


Messages In This Thread
How to do this? - by rbN. - 27.08.2010, 08:06
Re: How to do this? - by iggy1 - 27.08.2010, 08:28
Re: How to do this? - by rbN. - 27.08.2010, 08:30
Re: How to do this? - by iggy1 - 27.08.2010, 09:25

Forum Jump:


Users browsing this thread: 1 Guest(s)