[AJUDA]Sistema de Rota
#3

PHP код:
//TROQUE X, Y e Z PELAS COORDENADAS DOS CHECKPOINTS.
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext,"/rota",true) == 0)
    {
        if(
GetPVarInt(playerid,"Rota") > 0) return SendClientMessage(playerid, -1," Vocк jб estб em uma corrida.");
        
SendClientMessage(playerid,-1,"Vocк acaba de iniciar uma corrida. Siga os checkpoints para concluir sua rota.");
        
SetPlayerCheckpoint(playeridXYZ8.0);
        
SetPVarInt(playerid,"Rota",1);
        return 
1;
    }
    return 
0;
}
public 
OnPlayerEnterCheckpoint(playerid)
{
    switch(
GetPVarInt(playerid,"Rota"))
    {
        case 
1:
        {
            
SetPlayerCheckpoint(playeridXYZ8.0);
            
SendClientMessage(playerid, -1"Checkpoints: 1 / 5");
            
SetPVarInt(playerid,"Rota",2);
            return 
1;
        }
        case 
2:
        {
            
SetPlayerCheckpoint(playeridXYZ8.0);
            
SendClientMessage(playerid, -1"Checkpoints: 2 / 5");
            
SetPVarInt(playerid,"Rota",3);
            return 
1;
        }
        case 
3:
        {
            
SetPlayerCheckpoint(playeridXYZ8.0);
            
SendClientMessage(playerid, -1"Checkpoints: 3 / 5");
            
SetPVarInt(playerid,"Rota",4);
            return 
1;
        }
        case 
4:
        {
            
SetPlayerCheckpoint(playeridXYZ8.0);
            
SendClientMessage(playerid, -1"Checkpoints: 4 / 5");
            
SetPVarInt(playerid,"Rota",5);
            return 
1;
        }
        case 
5:
        {
            
DisablePlayerCheckpoint(playerid);
            
SendClientMessage(playerid, -1"Checkpoints: 5 / 5");
            
SendClientMessage(playerid, -1"Corrida concluнda.");
            
GivePlayerMoney(playeridVALOR); //LEMBRE-SE DE TROCAR "VALOR" PELO DINHEIRO QUE VOCК QUER DAR AO JOGADOR
            
SetPVarInt(playerid,"Rota",0);
            return 
1;
        }
        return 
1;
    }
    return 
1;

Reply


Messages In This Thread
[AJUDA]Sistema de Rota - by SuperGame - 31.05.2011, 23:46
Re: [AJUDA]Sistema de Rota - by TheGarfield - 31.05.2011, 23:54
Re: [AJUDA]Sistema de Rota - by Shadoww5 - 01.06.2011, 00:23
Re: [AJUDA]Sistema de Rota - by TheGarfield - 01.06.2011, 00:37
Re: [AJUDA]Sistema de Rota - by Shadoww5 - 01.06.2011, 00:41
Re: [AJUDA]Sistema de Rota - by SuperGame - 01.06.2011, 01:05
Re: [AJUDA]Sistema de Rota - by TheGarfield - 01.06.2011, 01:34
Re: [AJUDA]Sistema de Rota - by Rodox_Mortein - 01.06.2011, 02:30
Re: [AJUDA]Sistema de Rota - by Shadoww5 - 01.06.2011, 08:58

Forum Jump:


Users browsing this thread: 1 Guest(s)