SA-MP Forums Archive
checkpoints. :SS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: checkpoints. :SS (/showthread.php?tid=224925)



checkpoints. :SS - Gh0sT_ - 12.02.2011

Ok, created my-own biz system, but one problem.. When I enter any cp(EXCEPT biz) - workin'. But, when I enter biz cp - server do nothing.. ://

script:
pawn Код:
public OnPlayerEnterDynamicCP( playerid, checkpointid )
{
//Some cps..
    for( new ID = 0; ID < MAX_BUSINESS; ID ++ )
    {
        if( checkpointid == VersluCP[ ID ] )
        {
            new
                Stringas[ 256 ]
            ;
            if( GetPVarInt( playerid, "Biznis" ) == ID ) return ShowPlayerDialog( playerid, 49, DIALOG_STYLE_LIST, ""#h_Geltona"Biznio meniu.", ""#h_Raudona"Verslo informacija\n"#h_Raudona"Parduoti biznб\n"#h_Raudona"Iрimti pinigш iр uюdirbto pelno", "Rinktis", "" ), SetPVarInt( playerid, "pBiznis", ID );
            if( VersluDB[ ID ][ bNupirktas ] )
            {
                SetPVarInt( playerid, "pBiznis", ID );
                format( Stringas, 256, ""#h_Zalia"Pavadinimas: "#h_Raudona"%s\n"#h_Zalia"Kaina: "#h_Raudona"%d\n"#h_Zalia"Pelnas: "#h_Raudona"%d\n"#h_Zalia"Pardavimo kaina: "#h_Raudona"%d", VersluDB[ ID ][ bSavininkas ], VersluDB[ ID ][ bKaina ], VersluDB[ ID ][ bPelnas ][ 0 ], VersluDB[ ID ][ bPardavimas ] );
                ShowPlayerDialog( playerid, 50, DIALOG_STYLE_MSGBOX, ""#h_Balta"BIZNIS PARDUODAMAS.", Stringas, "Pirkti", "Nepirkti" );
            }
            else
            {
                format( Stringas, 222, ""#h_Balta"[ > ] "#h_Geltona"Biznis "#h_Orandzine"%s "#h_Geltona"yra "#h_Raudona"nupirktas. "#h_Pilka"Jo savininkas yra: %s", VersluDB[ ID ][ bPavadinimas ], VersluDB[ ID ][ bSavininkas ] );
                SendClientMessage( playerid, -1, Stringas );
            }
        }
        return true;
    }
        return true;
}
help.:S


Re: checkpoints. :SS - Gh0sT_ - 12.02.2011

bump :}}