Command /Getcar does not work for me
#5

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.
Reply


Messages In This Thread
Command /Getcar does not work for me - by Idan111 - 16.11.2009, 10:08
Re: Command /Getcar does not work for me - by Virtual1ty - 16.11.2009, 10:14
Re: Command /Getcar does not work for me - by Idan111 - 16.11.2009, 10:18
Re: Command /Getcar does not work for me - by Dion1 - 03.05.2012, 18:48
Re: Command /Getcar does not work for me - by HighPitchedVoice - 03.05.2012, 18:56
Re: Command /Getcar does not work for me - by ViniBorn - 03.05.2012, 18:56
Re: Command /Getcar does not work for me - by Dion1 - 03.05.2012, 20:45

Forum Jump:


Users browsing this thread: 2 Guest(s)