Errors?
#3

pawn Код:
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
    if(checkpointid == 1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
        else
        {
            ShowPlayerDialog(playerid,DIALOG_OTTO,DIALOG_STYLE_LIST,"{FF0000}Otto's Car Menu","{FFFFFF}Infernus ($120000)\nTurismo ($120000)\nHotring Racer ($200000)\nSuper GT ($150000)\nSultan ($50000)\nStretch ($80000)\nElegy ($60000)\nElegant ($40000)\nBullet ($100000)\nBuffalo ($50000)\nJester ($90000)\nClub ($40000)\nNRG-500 ($250000)\n{FF0000}Attempt Robbery","Ok","Cancel");
        }
    }
    if(checkpointid == 2)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
    }
    if(checkpointid == 3)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
    }
    if(checkpointid == 4)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
    }
    if(checkpointid == 5)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
        else
        {
            SetPlayerPos(playerid,237.66,141.35,1003.05);
            SetPlayerInterior(playerid, 3);
        }
    }
    if(checkpointid == 6)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
        else
        {
            ShowPlayerDialog(playerid,DIALOG_HOSPITAL,DIALOG_STYLE_LIST,"Hospital Menu","{FFFFFF}Heal ($5000)\nCure ($5000)\nHeal and Cure ($10000)\n{FF0000}Attempt Robbery","Ok","Cancel");
        }
    }
    if(checkpointid == 7)
    {
        SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}You must be in the Checkpoint at the SFPD garage to drop off suspects.");

    }
    if(checkpointid == 8)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");

        }
        else
        {
            SetPlayerPos(playerid,-25.69,-55.81,1003.05);
            SetPlayerInterior(playerid, 6);
        }
    }
    if(checkpointid == 9)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
        else
        {
            if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_SWAT || gTeam[playerid] == TEAM_MEDIC)
            {
                SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}Dude, i do not sell anything here, why you at my back door?");
            }
            ShowPlayerDialog(playerid,DIALOG_DRUGHOUSE,DIALOG_STYLE_LIST,"{FF0000}Drug House Menu","Weed - 100g ($20000)\nWeed - 500g($80000)\nWeed - 1000g ($150000)\nWeed - 5000g ($500000)\nHeroin - 5 Injections ($10000)\nHeroin - 20 Injections ($30000)\nHeroin - 50 Injections ($80000)\nHeroin - 200 Injections ($250000)\n{FF0000}Attempt Robbery","Ok","Cancel");
        }
    }
    if(checkpointid == 10)
    {
        SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}You must be in the Checkpoint at the SFPD garage to drop off suspects.");

    }
    if(checkpointid == 11)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}{FFFFFF}[{1E90FF}SERVER{FFFFFF}]: {FFFFFF}You must exit your vehicle before entering a checkpoint.");
        }
        else
        {
            if(gTeam[playerid] < 9)
            {
                SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}We do not sell anything here ..");
            }
        }
    }
    if(checkpointid == 12)
    {
        SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[ERROR]: {FFFFFF}You must be in the Checkpoint at the SFPD garage to drop off suspects.");
    }
    return 1;
}

Lemme know if it works, if yes +rep
Reply


Messages In This Thread
Errors? - by Mustafa6155 - 20.11.2012, 15:54
Re: Errors? - by Mustafa6155 - 20.11.2012, 16:35
Re: Errors? - by vernz - 20.11.2012, 16:49
Re: Errors? - by Mustafa6155 - 20.11.2012, 17:06
Re: Errors? - by vernz - 20.11.2012, 17:06
Re: Errors? - by Mustafa6155 - 20.11.2012, 17:18

Forum Jump:


Users browsing this thread: 2 Guest(s)