Server says command doesn't exist, but it still executes
#9

pawn Код:
CMD:veh(playerid, params[])
{
    if(GetPVarInt(playerid, "LoggedIn") == 0) return SendClientMessage(playerid, -1, "ERROR: You are not logged in.");
    if(Player[playerid][AdminLevel] >= 4)
    {
        new string[128], vehid, color1, color2;
        if(sscanf(params, "iii", vehid, color1, color2)) return SendClientMessage(playerid, -1, "Command Usage: /veh [vehicle id] [color1] [color2]");
        if(vehid >= 400 && vehid <= 611)
        {
            new Float:pX, Float:pY, Float:pZ, Float:pA;
            GetPlayerPos(playerid, pX, pY, pZ);
            GetPlayerFacingAngle(playerid, pA);
            CreateVehicle(vehid, pX+5, pY+5, pZ, pA, color1, color2, 180);
            format(string, sizeof(string), "[AdminCMD] You have just spawned a %s.", GetVehicleName(vehid));
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        else
        {
            SendClientMessage(playerid, -1, "Command Usage: /veh [vehicle id] [color1] [color2]");
        }
    }
    else
    {
         SendClientMessage(playerid, -1, ""ADMIN"");
    }
    return 1;
}
I did some structure changes and about ADMIN if it's defined something like this:
#define ADMIN "you are not an admin"
Then you should script it as I have done in the message
I hope that it will work any feedback would be appreciated!.
Reply


Messages In This Thread
Server says command doesn't exist, but it still executes - by DTV - 28.07.2014, 03:07
Re: Server says command doesn't exist, but it still executes - by Don_Cage - 28.07.2014, 03:36
Re: Server says command doesn't exist, but it still executes - by DTV - 28.07.2014, 19:00
Re: Server says command doesn't exist, but it still executes - by Blademaster680 - 28.07.2014, 19:03
Re: Server says command doesn't exist, but it still executes - by DaniceMcHarley - 28.07.2014, 19:08
Re: Server says command doesn't exist, but it still executes - by Dignity - 29.07.2014, 05:22
Re: Server says command doesn't exist, but it still executes - by Konstantinos - 29.07.2014, 08:58
Re: Server says command doesn't exist, but it still executes - by Jefff - 31.07.2014, 21:27
Re: Server says command doesn't exist, but it still executes - by Stanford - 31.07.2014, 21:30
Re : Server says command doesn't exist, but it still executes - by ManuelNeuer - 31.07.2014, 21:31
Re: Server says command doesn't exist, but it still executes - by Don_Cage - 31.07.2014, 21:39
Re: Server says command doesn't exist, but it still executes - by DaniceMcHarley - 31.07.2014, 23:26
Re: Server says command doesn't exist, but it still executes - by DTV - 31.07.2014, 23:54
Re: Server says command doesn't exist, but it still executes - by Basssiiie - 01.08.2014, 02:27
Re: Server says command doesn't exist, but it still executes - by Don_Cage - 01.08.2014, 07:55
Re: Server says command doesn't exist, but it still executes - by Konstantinos - 01.08.2014, 09:11
Re: Server says command doesn't exist, but it still executes - by dirigent00 - 01.08.2014, 10:23
Re: Server says command doesn't exist, but it still executes - by DTV - 03.08.2014, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)