I need help!
#5

pawn Код:
#include <a_samp>

#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
forward unfreezeplayer();

new BusJob[256];
public unfreezeplayer();
{
      TogglePlayerControllable(all, 1);
}
public OnFilterScriptInit()
{
     
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/ruta1", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
        {
            BusJob[playerid] = 1;
            new name[MAX_PLAYER_NAME], string[48];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "* %s vozi rutu jedan.", name );
            SendClientMessageToAll(COLOR_YELLOW, string);
            SetPlayerCheckpoint(playerid,1246.2437,-1847.1620,13.5907,5);
            SendClientMessage(playerid,COLOR_YELLOW,"* Prati crvene markere na radaru da bi zaraio nesto para!");
            return 1;
        }
        SendClientMessage(playerid, COLOR_RED,"Moras biti u autobusu za prijevoz putnika da bi radio rutu!");
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
     {
         SendClientMessage(playerid, COLOR_RED, "*Sad mozes krenuti sa prevozom putnika ~/ruta1~");
     }
     return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 437)
     {
        if(BusJob[playerid] == 1){
            BusJob[playerid] = 2;
            SetPlayerCheckpoint(playerid,1042.0785,-1760.6067,13.5953,5);
            SetTimer("unfreezeplayer", 30000, false);
            for(new all=0; all < MAX_PLAYERS; all++)
            {
                   TogglePlayerControllable(all, 0);
                   return 1;
            }
        if(BusJob[playerid] == 2){
            BusJob[playerid] = 3;
            SetPlayerCheckpoint(playerid,1001.4951,-1485.8391,13.5637,5);
            return 1;
           }
        if(BusJob[playerid] == 3){
            BusJob[playerid] = 4;
            SetPlayerCheckpoint(playerid,842.0739,-1392.3109,13.5187,5);
            return 1;
         }
        if(BusJob[playerid] == 4){
            BusJob[playerid] = 5;
            SetPlayerCheckpoint(playerid,497.3190,-1448.8719,16.2296,5);
            return 1;
         }
        if(BusJob[playerid] == 5){
            BusJob[playerid] = 6;
            SetPlayerCheckpoint(playerid,380.4133,-1643.3300,32.7374,5);
            return 1;
         }
        if(BusJob[playerid] == 6){
            BusJob[playerid] = 7;
            SetPlayerCheckpoint(playerid,375.1918,-2028.4211,7.8789,5);
            return 1;
         }
        if(BusJob[playerid] == 7){
            BusJob[playerid] = 8;
            SetPlayerCheckpoint(playerid,620.7009,-1697.9086,15.4668,5);
            return 1;
         }
        if(BusJob[playerid] == 8){
            BusJob[playerid] = 9;
            SetPlayerCheckpoint(playerid,737.8829,-1780.7576,13.2861,5);
            return 1;
         }
        if(BusJob[playerid] == 9){
            BusJob[playerid] = 10;
            SetPlayerCheckpoint(playerid,1236.9111,-1855.8455,13.5165,5);
            return 1;
         }
        if(BusJob[playerid] == 11){
            BusJob[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            SendClientMessage(playerid,COLOR_YELLOW,"* Zaradio si 200$ na prevozom putnika.");
            GivePlayerMoney(playerid,200);
         }
     }
     return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(BusJob[playerid] > 0)
    {
        BusJob[playerid] = 0;
        SendClientMessage(playerid, COLOR_RED, "* Napustio si autobus,prevoz putnika prekinut.");
        DisablePlayerCheckpoint(playerid);
    }
}
its not tested i just folow the wiki exsample..
u add the rest of the code..
Sorry if im wrong :/
Reply


Messages In This Thread
I need help! - by Pasa - 26.07.2011, 06:51
Re: I need help! - by Pasa - 26.07.2011, 07:26
Re: I need help! - by Rolyy - 26.07.2011, 07:36
Re: I need help! - by Pasa - 26.07.2011, 07:54
Re: I need help! - by Rafa - 26.07.2011, 08:11
Re: I need help! - by [MG]Dimi - 26.07.2011, 08:23
Re: I need help! - by Pasa - 26.07.2011, 08:34
Re: I need help! - by [MG]Dimi - 26.07.2011, 08:38
Re: I need help! - by Pasa - 26.07.2011, 08:46
Re: I need help! - by Rafa - 26.07.2011, 09:01

Forum Jump:


Users browsing this thread: 1 Guest(s)