Taxi System
#5

Alright, now i got some other errors

Errors:
PHP код:
 C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130510) : error 035argument type mismatch (argument 2)
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130548) : error 035argument type mismatch (argument 2)
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130560) : error 035argument type mismatch (argument 2
Code
PHP код:
CMD:taxi(playeridparams[])
{
    new 
string[128];
    new 
option[11], secoptionvehicle GetPlayerVehicleID(playerid);
    if(
PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17 || PlayerInfo[playerid][pTaxiLicense] == 1)
    {
    if(
sscanf(params,"s[32]"optionsecoption))
    {
        
SendClientMessage(playerid"/taxi [option]"); // Error here 
        
SendClientMessageEx(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_YELLOW"[TAXI]: You are now OFF duty taxi and won't recieve calls.");
            
SetPlayerToTeamColor(playerid);
            
TaxiDuty{playerid} = false;
            
TaxiMade[playerid] = 0;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_YELLOW"[TAXI]: You are now ON duty taxi and will recieve calls.");
            
SetPlayerToTeamColor(playerid);
            
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_YELLOW"[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,"d",fare)) return SendClientMessage(playerid"/taxi fare [amount]"); // Error here
        
if(!TaxiDuty{playerid}) return SendClientMessageEx(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(stringsizeof(string), "[TAXI]: You have changed your taxi fare to $%d."fare);
        
SendClientMessage(playeridCOLOR_YELLOWstring);
        
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,"i",id)) return SendClientMessage(playerid"/taxi accept [playerid]"); // Error here
        
if(!TaxiDuty{playerid}) return SendClientMessageEx(playeridCOLOR_GREY"You are not on duty.");
        if(!
IsPlayerConnected(id)) return Error(playerid"That player is not connected");
        if(
GetPVarInt(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!"GetPlayerNameEx(playerid), TaxiFare{playerid});
        
SendClientMessage(idCOLOR_YELLOWstring);
        
format(stringsizeof(string), "* You have accepted %s taxi call."GetPlayerNameEx(id));
        
SendClientMessage(playeridCOLOR_YELLOWstring);
    }
    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_YELLOW"[TAXI]: Your taxi fare has stopped and charges all people inside.");
        
format(stringsizeof(string), "[TAXI]: The final fare of your taxi has reached to, $%d."TaxiMade[playerid]);
        
SendClientMessage(playeridCOLOR_YELLOWstring);
        foreach(
Playeri)
        {
            if(
PlayerInCar(i) && GetPlayerState(i) != PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
            {
                
ChargePerson(i);
            }
        }
        
TaxiStart{playerid} = false;
        
TaxiMade[playerid] = 0;
    }
        }
    else
    {
        
SendClientMessageEx(playerid,COLOR_GREY,"You're not a licensed taxi/bus driver!");
        return 
1;
    }
    return 
1;

Error:
PHP код:
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(130449) : warning 202number of arguments does not match definition 
Code:
PHP код:
stock IsDriver(playerid)
{
    if(
PlayerInCar(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        return 
true;
    else
        return 
false// Error hwew

And i get other error
PHP код:
C:\Users\Euronics Latvija\Desktop\MYSERVER\gamemodes\clrp.pwn(14871) : error 025: function heading differs from prototype 
Code
PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart
I know bodyparts is for 0.3z but i have already 0.3z
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)