server: unknown command
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    teamid = GetPlayerTeam(playerid);
    new command[130], params[130];
    if(sscanf(cmdtext, "s[128]s[128]", command, params) != 0)
    {
        sscanf(cmdtext, "s[128]", command);
    }
    if(!strcmp("/rescue", command, true, 7))
    {
        switch(teamid)
        {
            case 1: // \r\n Adds a new item to the list
            {
                ShowPlayerDialog(playerid,PoliceRescueDialog,DIALOG_STYLE_LIST,"Choose rescue point","LVPD\r\nSFPD","Rescue","Cancel");
            }
            case 2:
            {
                ShowPlayerDialog(playerid,TruckersRescueDialog,DIALOG_STYLE_LIST,"Choose rescue point","Lv Truck Depot\r\nLs Truck Depot\r\nRock Shore Depot\r\nWillowfield Depot\r\nSF Truck Depot\r\nRS Haul","Rescue","Cancel");
            }

            case 3:
            {
                ShowPlayerDialog(playerid,AssistanceRescueDialog,DIALOG_STYLE_LIST,"Choose rescue point","BlueBerry Garage\r\nRock Shore Depot\r\nSF Truck Depot","Rescue","Cancel");
            }
            case 4:
            {
                ShowPlayerDialog(playerid,BusRescueDialog,DIALOG_STYLE_LIST,"Choose rescue point","LV Bus Terminal\r\nLS Bus Depot","Rescue","Cancel");
            }
            case 5:
            {
                ShowPlayerDialog(playerid,CabbieRescueDialog,DIALOG_STYLE_LIST,"Choose rescue point","LV Cab Office\r\nLS Cab Office\r\nSF Cab Office","Rescue","Cancel");
            }
        }
        return 1;
    }
    return 0;
}
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Reply


Messages In This Thread
server: unknown command - by [LHT]Bally - 19.09.2011, 13:26
Re: server: unknown command - by HuSs3n - 19.09.2011, 13:27
Re: server: unknown command - by [LHT]Bally - 19.09.2011, 13:28
Re: server: unknown command - by |_ⒾⓇⓄN_ⒹⓄG_| - 19.09.2011, 13:34
Re: server: unknown command - by =WoR=Varth - 19.09.2011, 13:40
Re: server: unknown command - by =WoR=G4M3Ov3r - 19.09.2011, 13:41
Re: server: unknown command - by [LHT]Bally - 19.09.2011, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)