[Help] SERVER: Unknown Command
#1

Hi, i have made this command,it works on compiler but when i type /vmenu in game it says "Server: Unknown Command". Please Help me. [Sorry for bad english but i'm italian]
Код:
dcmd_vmenu(playerid, params[])
{
		#pragma unused params
		new string2[256],z=0,vvid=-1;
		if(IsPlayerInAnyVehicle(playerid))vvid=GetPlayerVehicleID(playerid);
		new name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		for(new vehid=0;vehid<MAX_VEHICLES;vehid++)
		{
			if(strlen(name)==strlen(CarInfo[vehid][cOwner]) && !strcmp(name,CarInfo[vehid][cOwner],false,MAX_PLAYER_NAME))
			{
				if(vehid==0)format(string2,sizeof(string2),"%s",string2,CarInfo[vehid][cDescription]);
				else format(string2,sizeof(string2),"%s\n%s",string2,CarInfo[vehid][cDescription]);
				if(vehid==vvid) format(string2,sizeof(string2),"%s",string2);

				VMenuInfo[playerid][itemvid][z]=vehid;
				z++;
			}
			else VMenuInfo[playerid][itemvid][vehid]=-1;
		}
		if(z==0) return SendClientMessage(playerid,COLOR_WHITE,"Non possiedi uno o piщ veicoli");
        ShowPlayerDialog(playerid, dialog_VMenu, DIALOG_STYLE_LIST, "VMenu - I tuoi veicoli", string2, "Seleziona", "Annulla");
		return 1;
    }
Reply
#2

UP
Reply
#3

pawn Код:
dcmd_vmenu(playerid, params[])
{
        #pragma unused params
        new string2[256],z=0,vvid=-1;
        if(IsPlayerInAnyVehicle(playerid))vvid=GetPlayerVehicleID(playerid);
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        for(new vehid=0;vehid<MAX_VEHICLES;vehid++)
        {
            if(strlen(name)==strlen(CarInfo[vehid][cOwner]) && !strcmp(name,CarInfo[vehid][cOwner],false,MAX_PLAYER_NAME))
            {
                if(vehid==0)format(string2,sizeof(string2),"%s",string2,CarInfo[vehid][cDescription]);
                else format(string2,sizeof(string2),"%s\n%s",string2,CarInfo[vehid][cDescription]);
                if(vehid==vvid) format(string2,sizeof(string2),"%s",string2);

                VMenuInfo[playerid][itemvid][z]=vehid;
                z++;
            }
            else
                        {
                        VMenuInfo[playerid][itemvid][vehid]=-1;
                        }
        }
        if(z==0) return SendClientMessage(playerid,COLOR_WHITE,"Non possiedi uno o piщ veicoli");
        ShowPlayerDialog(playerid, dialog_VMenu, DIALOG_STYLE_LIST, "VMenu - I tuoi veicoli", string2, "Seleziona", "Annulla");
        return 1;
    }
Reply
#4

Quote:
Originally Posted by Eth
Посмотреть сообщение
CODE
I have the same problem
Reply
#5

Are u using filterscript or gamemode
Reply
#6

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
Are u using filterscript or gamemode
Gamemode
Reply
#7

Check ur cmd that is it working or not delete ur code and write a sendclinetmessage that start ur server n check is ur cmd working or not, and also check that is there any other cmd which is same as ur cmd
Reply
#8

Quote:
Originally Posted by PrinceKumar
Посмотреть сообщение
Check ur cmd that is it working or not delete ur code and write a sendclinetmessage that start ur server n check is ur cmd working or not, and also check that is there any other cmd which is same as ur cmd
I have tested,if i put instead of ShowPlayerDialog ecc.. ecc... SendClientMessage it says "SERVER: Unknown Command"
Reply
#9

UP
Reply
#10

Load crashdetect plugin. Start the server again and execute that command. If it displays the unknown command message, then post your server log.

By the way, your arguments in the format are wrong. You forgot 1 placeholder.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)