Taxi System
#1

So i am trying to add some realistic taxi system to my server but i have some errors

ERRORS
PHP код:
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130417) : error 017undefined symbol "TAXI"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130433) : error 017undefined symbol "TAXI"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130434) : error 017undefined symbol "GetName"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130435) : error 017undefined symbol "TAXI"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130437) : error 017undefined symbol "TAXI"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130438) : error 017undefined symbol "TAXI"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130447) : warning 202number of arguments does not match definition
C
:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130454) : error 017undefined symbol "COLOR_YELLOWG"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130455) : error 017undefined symbol "GiveCash"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130456) : error 017undefined symbol "GiveCash"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130466) : error 017undefined symbol "PlayerIsOn"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130468) : error 017undefined symbol "IsDriver"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130481) : warning 235: public function lacks forward declaration (symbol "IsATaxi")
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130493) : error 017undefined symbol "i"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130493) : error 017undefined symbol "SCM"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130496) : error 017undefined symbol "SyntaxMSG"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130502) : error 017undefined symbol "IsDriver"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130506) : error 017undefined symbol "COLOR_YELLOWG"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130507) : error 017undefined symbol "SetNormalColor"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130513) : error 017undefined symbol "COLOR_YELLOWG"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130514) : error 017undefined symbol "TAXI_DUTY"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130521) : error 017undefined symbol "IsDriver"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130526) : error 017undefined symbol "COLOR_YELLOWG"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130532) : error 017undefined symbol "IsDriver"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130534) : error 017undefined symbol "SyntaxMSG"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130537) : error 017undefined symbol "msg"
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130537) : error 017undefined symbol "msg" 
Code
PHP код:
//===========================Taxi System by Jack Robertson============================//
stock MessageJob(jobcolormessage[], bool:checkduty)
{
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pJob] == job || PlayerInfo[i][pJob2] == job)
        {
            if(
checkduty == true)
            {
                if(
PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17)
                {
                    
SendClientMessage(icolormessage);
                }
            }
            else 
            {
                
SendClientMessage(icolormessage);
            }
        }
    }
    return 
1;
}
stock SendTaxiRequest(playeridlocation[])
{
    new 
string[128];
    
MessageJob(TAXICOLOR_YELLOWG"|_________Taxi Call_________|",true);
    
format(stringsizeof(string), "Caller: %s Ph: %d"GetPlayerNameEx(playerid), PlayerInfo[playerid][pPnumber]);
    
MessageJob(TAXICOLOR_YELLOWGstringtrue);
    
format(stringsizeof(string), "Location: %s"location);
    
MessageJob(TAXICOLOR_YELLOWGstringtrue);
    
MessageJob(TAXICOLOR_YELLOWG"** /taxi accept ID to take this mission! **"true);
    return 
1;
}
stock ChargePerson(playerid)
{
    new 
string[128];
    if(
GetPlayerMoney(playerid) < TaxiMoney[playerid])
    {
        
SendClientMessageEx(GetVehicleDriver(OldVehicle[playerid]), COLOR_WHITE"%s doesn't have enough money to pay for the TAXI."GetPlayerNameEx(playerid));
        
TaxiMade[GetVehicleDriver(OldVehicle[playerid])] -= TaxiMoney[playerid];
        
TaxiMoney[playerid] = 0;
    }
    else
    {
        
format(stringsizeof(string), "[TAXI]: The final taxi fare has got to, $%d."TaxiMoney[playerid]);
        
SendClientMessage(playeridCOLOR_YELLOWGstring);
        
GiveCash(playerid, -TaxiMoney[playerid]);
        
GiveCash(GetVehicleDriver(OldVehicle[playerid]), TaxiMoney[playerid]);
        
TaxiMade[GetVehicleDriver(OldVehicle[playerid])] -= TaxiMoney[playerid];
        
TaxiMoney[playerid] = 0;
    }
}
stock GetVehicleDriver(vehicle)
{
    for(new 
0MAX_PLAYERSi++)
    {
        if(
PlayerIsOn(i))
        {
            if(
IsDriver(i) && GetPlayerVehicleID(i) == vehicle)
                return 
i;
        }
    }
    return 
INVALID_PLAYER_ID;
}
stock ShowJobMessage(playeridmessage[])
{
    
ShowTextDraw(playeridTruckerDraw[playerid]);
    
TextDrawSetString(TruckerDraw[playerid], message);
    return 
1;
}
public 
IsATaxi(vehicle)
{
    new 
model GetVehicleModel(vehicle);
    if(
model == 420 || model == 438)
    {
        return 
1;
    }
    return 
0;
}
CMD:taxi(playeridparams[])
{
    new 
option[11], secoptionvehicle GetPlayerVehicleID(playerid);
    if(
TransportDuty[i] > && (PlayerInfo[i][pJob] == 17 || PlayerInfo[i][pJob2] == 17 || PlayerInfo[i][pTaxiLicense] == )) return SCM(playeridCOLOR_WHITE"You are not a taxi driver.");
    if(
sscanf(params,"s[11]D(-1)"optionsecoption))
    {
        
SyntaxMSG(playerid"/taxi [option]");
        
SendClientMessage(playeridCOLOR_GREY"Options: | duty | start | stop | fare | accept |");
        return 
1;
    }
    if(
CompareStrings(option"duty"))
    {
        if(!
IsDriver(playerid)) return SendClientMessage(playeridCOLOR_GREY"You must be inside a Taxi/Cabbie as a driver.");
        if(!
IsATaxi(vehicle)) return SendClientMessage(playeridCOLOR_LIGHTRED"You must be inside a Taxi/Cabbie.");
        if(
TaxiDuty{playerid})
        {
            
SendClientMessage(playeridCOLOR_YELLOWG"[TAXI]: You are now OFF duty taxi and won't recieve calls.");
            
SetNormalColor(playerid);
            
TaxiDuty{playerid} = false;
            
TaxiMade[playerid] = 0;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_YELLOWG"[TAXI]: You are now ON duty taxi and will recieve calls.");
            
SetPlayerColor(playeridTAXI_DUTY);
            
TaxiDuty{playerid} = true;
            
TaxiMade[playerid] = 0;
        }
    }
    if(
CompareStrings(option"start"))
    {
        if(!
IsDriver(playerid)) return SendClientMessage(playeridCOLOR_GREY"You must be inside a Taxi/Cabbie as a driver.");
        if(!
IsATaxi(vehicle)) return SendClientMessage(playeridCOLOR_LIGHTRED"You must be inside a Taxi/Cabbie.");
        if(!
TaxiDuty{playerid}) return SendClientMessage(playeridCOLOR_GREY"You are not on duty.");
        if(
TaxiFare{playerid} == 0) return SendClientMessage(playeridCOLOR_GREY"You haven't set a fare yet, /taxi fare ($1-$25)");
        if(
TaxiStart{playerid}) return SendClientMessage(playeridCOLOR_GREY"Your taxi fare has already started.");
        
SendClientMessage(playeridCOLOR_YELLOWG"[TAXI]: Your taxi fare has started and charging all people inside your vehicle.");
        
TaxiStart{playerid} = true;
    }
    if(
CompareStrings(option"fare"))
    {
        new 
fare;
        if(!
IsDriver(playerid)) return SendClientMessage(playeridCOLOR_GREY"You must be inside a Taxi/Cabbie as a driver.");
        if(!
IsATaxi(vehicle)) return SendClientMessage(playeridCOLOR_LIGHTRED"You must be inside a Taxi/Cabbie.");
        if(
sscanf(params,"{s[11]}d",fare)) return SyntaxMSG(playerid"/taxi fare [amount]");
        if(!
TaxiDuty{playerid}) return SendClientMessage(playeridCOLOR_GREY"You are not on duty.");
        if(
fare || fare 25) return SendClientMessage(playeridCOLOR_GREY"There is a limit for taxi fare, ($1-$25).");
        
format(msgsizeof(msg), "[TAXI]: You have changed your taxi fare to $%d."fare);
        
SendClientMessage(playeridCOLOR_YELLOWGmsg);
        
TaxiFare{playerid} = fare;
    }
    if(
CompareStrings(option"accept"))
    {
        new 
id;
        if(!
IsDriver(playerid)) return SendClientMessage(playeridCOLOR_GREY"You must be inside a Taxi/Cabbie as a driver.");
        if(!
IsATaxi(vehicle)) return SendClientMessage(playeridCOLOR_LIGHTRED"You must be inside a Taxi/Cabbie.");
        if(
sscanf(params,"{s[11]}d",id)) return SyntaxMSG(playerid"/taxi accept [playerid]");
        if(!
TaxiDuty{playerid}) return SendClientMessage(playeridCOLOR_GREY"You are not on duty.");
        if(!
PlayerIsOn(id)) return NotConnectedMSG(playerid);
        if(
GetIntVar(id"NeedTaxi") == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"This player hasn't requested any taxi.");
        
format(stringsizeof(string), "* %s has accepted your taxi call, he charges %d per second!"GetNameEx(playerid), TaxiFare{playerid});
        
SendClientMessage(idCOLOR_YELLOWGstring);
        
format(stringsizeof(string), "* You have accepted %s taxi call."GetNameEx(id));
        
SendClientMessage(playeridCOLOR_YELLOWGstring);
    }
    if(
CompareStrings(option"stop"))
    {
        if(!
IsDriver(playerid)) return SendClientMessage(playeridCOLOR_GREY"You must be inside a Taxi/Cabbie as a driver.");
        if(!
IsATaxi(vehicle)) return SendClientMessage(playeridCOLOR_LIGHTRED"You must be inside a Taxi/Cabbie.");
        if(!
TaxiDuty{playerid}) return SendClientMessage(playeridCOLOR_GREY"You are not on duty.");
        if(!
TaxiStart{playerid}) return SendClientMessage(playeridCOLOR_GREY"Your taxi fare is not started.");
        
SendClientMessage(playeridCOLOR_YELLOWG"[TAXI]: Your taxi fare has stopped and charges all people inside.");
        
format(mstringsizeof(string), "[TAXI]: The final fare of your taxi has reached to, $%d."TaxiMade[playerid]);
        
SendClientMessage(playeridCOLOR_YELLOWGstring);
        foreach(
Playeri)
        {
            if(
PlayerInCar(i) && GetPlayerState(i) != PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
            {
                
ChargePerson(i);
            }
        }
        
TaxiStart{playerid} = false;
        
TaxiMade[playerid] = 0;
    }
    return 
1;

Reply


Messages In This Thread
Taxi System - by FaZeRs - 24.02.2014, 20:43
Re: Taxi System - by Aerotactics - 24.02.2014, 22:10
Re: Taxi System - by FaZeRs - 24.02.2014, 22:36
Re: Taxi System - by Aerotactics - 24.02.2014, 22:40
Re: Taxi System - by FaZeRs - 24.02.2014, 23:09
Re: Taxi System - by DarkLored - 25.02.2014, 01:08
Re: Taxi System - by FaZeRs - 25.02.2014, 01:40
Re: Taxi System - by FaZeRs - 25.02.2014, 02:31
Re: Taxi System - by Aerotactics - 25.02.2014, 04:16
Re: Taxi System - by FaZeRs - 25.02.2014, 11:59

Forum Jump:


Users browsing this thread: 2 Guest(s)