SA-MP Forums Archive
Command /Getcar does not work for me - 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: Command /Getcar does not work for me (/showthread.php?tid=108841)



Command /Getcar does not work for me - Idan111 - 16.11.2009

}
if(strcmp(cmd, "/getcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You need to login first.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /getcar [carid]");
return 1;
}
new Floatlocx,Floatlocy,Floatlocz;
new plo;
plo = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 3||IsPlayerAdmin(playerid))
{
GetPlayerPos(playerid, plocx, plocy, plocz);
SetVehiclePos(plo,plocx,plocy+4, plocz);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}


Re: Command /Getcar does not work for me - Virtual1ty - 16.11.2009

what are the error's or what doesn't work, be specific please, the command works just fine for me


Re: Command /Getcar does not work for me - Idan111 - 16.11.2009

I tell you I want to launch a car that does not work now I do not know why


Re: Command /Getcar does not work for me - Dion1 - 03.05.2012

i have the same problem


Re: Command /Getcar does not work for me - HighPitchedVoice - 03.05.2012

pawn Код:
if(strcmp(cmd, "/getcar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /getcar [carid]");
                return 1;
            }
            new Float:plocx,Float:plocy,Float:plocz;
            new plo;
            plo = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 6)
            {
                GetPlayerPos(playerid, plocx, plocy, plocz);
                SetVehiclePos(plo,plocx+8,plocy, plocz);
                LinkVehicleToInterior(plo, GetPlayerInterior(playerid));
                SetVehicleVirtualWorld(plo, GetPlayerVirtualWorld(playerid));
                format(string, sizeof(string),"AdmCmd: %s Has Teleported Vehicle [%d] To his Position",sendername,plo);
                ABroadCast(COLOR_LIGHTRED,string, 5);
                new y, m, d;
                new h,mi,s;
                getdate(y,m,d);
                gettime(h,mi,s);
                format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Teleported the car [%d] To himself.",d,m,y,h,mi,s,sendername,plo);
                AdminLog(string);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
            }
        }
        return 1;
    }
Be sure to use the right spaces between the barracks and the actions.


Re: Command /Getcar does not work for me - ViniBorn - 03.05.2012

Make your post between [pawn] [*/pawn] (Without *)


Re: Command /Getcar does not work for me - Dion1 - 03.05.2012

It worked fine till I edited prices in PPC_DefBuyableVehicles