SA-MP Forums Archive
Why? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why? (/showthread.php?tid=370165)



Why? - Windrush - 19.08.2012

Why i used /vcall comamnd it calls all my cars?

pawn Код:
CMD:vcall(playerid,params[]) {
    #pragma unused params
    CallVehicleToPlayer(playerid);
    CallVehicle2ToPlayer(playerid);
    CallVehicle3ToPlayer(playerid);
    CallVehicle4ToPlayer(playerid);
    CallVehicle5ToPlayer(playerid);
    CallVehicle6ToPlayer(playerid);
    CallVehicle7ToPlayer(playerid);
    CallVehicle8ToPlayer(playerid);
    CallVehicle9ToPlayer(playerid);
    CallVehicle10ToPlayer(playerid);
    CallVehicle11ToPlayer(playerid);
    CallVehicle12ToPlayer(playerid);
    CallVehicle13ToPlayer(playerid);
    CallVehicle14ToPlayer(playerid);
    CallVehicle15ToPlayer(playerid);
    return 1;



Re: Why? - ddnbb - 19.08.2012

Because you do call all your cars?


Re: Why? - Windrush - 19.08.2012

no i like this

/vcall 1
/vcall 2 i want 1 by 1 to call my cars
/vcall 3
up to
/vcall 15


Re: Why? - SEnergy - 19.08.2012

post me your CallVehicleToPlayer function


Re: Why? - Windrush - 19.08.2012

pawn Код:
CMD:vcall(playerid,params[]) {
    #pragma unused params
    CallVehicleToPlayer(playerid);
    CallVehicle2ToPlayer(playerid);
    CallVehicle3ToPlayer(playerid);
    CallVehicle4ToPlayer(playerid);
    CallVehicle5ToPlayer(playerid);
    CallVehicle6ToPlayer(playerid);
    CallVehicle7ToPlayer(playerid);
    CallVehicle8ToPlayer(playerid);
    CallVehicle9ToPlayer(playerid);
    CallVehicle10ToPlayer(playerid);
    CallVehicle11ToPlayer(playerid);
    CallVehicle12ToPlayer(playerid);
    CallVehicle13ToPlayer(playerid);
    CallVehicle14ToPlayer(playerid);
    CallVehicle15ToPlayer(playerid);
    return 1;
me using zcmd


Re: Why? - SEnergy - 19.08.2012

:facepalm:

CalLVehicleToPlayer function, not vcall command function


Re: Why? - ddnbb - 19.08.2012

Do you use sscanf?

Quote:
Originally Posted by SEnergy
Посмотреть сообщение
:facepalm:

CalLVehicleToPlayer function, not vcall command function
You dont need to see that...


Re: Why? - Windrush - 19.08.2012

yes i use sscanf


Re: Why? - Windrush - 19.08.2012

pawn Код:
CMD:vcall(playerid,params[]) {
    #pragma unused params
    CallVehicleToPlayer(playerid);
    CallVehicle2ToPlayer(playerid);
    CallVehicle3ToPlayer(playerid);
    CallVehicle4ToPlayer(playerid);
    CallVehicle5ToPlayer(playerid);
    CallVehicle6ToPlayer(playerid);
    CallVehicle7ToPlayer(playerid);
    CallVehicle8ToPlayer(playerid);
    CallVehicle9ToPlayer(playerid);
    CallVehicle10ToPlayer(playerid);
    CallVehicle11ToPlayer(playerid);
    CallVehicle12ToPlayer(playerid);
    CallVehicle13ToPlayer(playerid);
    CallVehicle14ToPlayer(playerid);
    CallVehicle15ToPlayer(playerid);
    return 1;
help please


Re: Why? - ddnbb - 19.08.2012

pawn Код:
CMD:vcall(playerid, params[])
{
    new vehicle;
    if(sscanf(params, "u", vehicle)) return SendClientMessage(playerid, COLOR_RED, "/vcall (1-15)");
    if(vehicle < 1 && vehicle > 15) return SendClientMessage(playerid, COLOR_RED, "/vcall (1-15)");
    {
        if(vehicle == 1) // first vehicle
        {
            CallVehicleToPlayer(playerid);
            return 1;
        }
        else if(vehicle == 2) //second vehicle etc.
        {
            CallVehicle2ToPlayer(playerid);
            return 1;
        }
    }
    return 1;
}
Let me know if this works.