SA-MP Forums Archive
I need help - 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: I need help (/showthread.php?tid=232011)



I need help - Ironboy - 26.02.2011

Hello!
I made a checkpoint inside a shop,but everytime it shows the CP icon on the map.
i dont want to show that red icon on the map.
anyone plz help me.


Re: I need help - tanush - 26.02.2011

script? or tell the interior x y z


Re: I need help - ifly4life - 26.02.2011

As above please show us the script


Re: I need help - Ironboy - 26.02.2011

this is the script
pawn Код:
if(strcmp(cmd, "/robbank", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
        SetPlayerInterior(playerid, 0);
        if(IsPlayerInRangeOfPoint(playerid,2.0,2315.3999,-4.5602,26.7422))
        {
            new rbank;
            rbank = random(5);
            if(GetPlayerWantedLevel(playerid) > 0)
            {
                SendClientMessage(playerid,COLOR_RED,"You must be innocent to rob The Bank");
                return 1;
            }
            if((playerid) == 999)
            {
                SendClientMessage(playerid,COLOR_RED,"You can only rob the bank from the Transactions Checkpoint inside the bank");
                return 1;
            }
            if(BankRobbedRecently >=1 ) {
                SendClientMessage(playerid,COLOR_ERROR,"The Bank has been robbed recenty. Please wait");
                return 1;
            }


            if(BankRobbedRecently == 1)
            {
                GameTextForPlayer(playerid, "~r~The Bank~n~~w~robbed recently~n~try again later",5000,5);
                return 1;
            }
            if(BankRobbedRecently == 0)
                {
                    switch(rbank)
                    {
                        case 2:
                        {
                            GameTextForPlayer(playerid, "~r~Robbery Failed",5000,3);
                            new plwl = GetPlayerWantedLevel(playerid);
                            SetPlayerWantedLevel(playerid, plwl +1 );
                            BankRobbedRecently = 1;
                            SetTimer("BankRobbedRecentlyTimer",45000,0);
                            return 1;
                        }
                        case 4:
                        {
                            GameTextForPlayer(playerid, "~r~Robbery Failed",5000,3);
                            new plwl = GetPlayerWantedLevel(playerid);
                            SetPlayerWantedLevel(playerid, plwl +1 );
                            BankRobbedRecently = 1;
                            SetTimer("BankRobbedRecentlyTimer",45000,0);
                            return 1;
                        }
                        case 5:
                        {
                            GameTextForPlayer(playerid, "~r~Robbery Failed",5000,3);
                            new plwl = GetPlayerWantedLevel(playerid);
                            SetPlayerWantedLevel(playerid, plwl +1 );
                            BankRobbedRecently = 1;
                            SetTimer("BankRobbedRecentlyTimer",45000,0);
                            return 1;
                        }
                    }
                    new rcash = random(100000);
                    GivePlayerMoney(playerid,rcash);
                    new str[128];
                    format(str,sizeof(str),"~w~ROBBED~n~$%d",rcash);
                    GameTextForPlayer(playerid,str,5000,3);
                    new plwl = GetPlayerWantedLevel(playerid);
                    SetPlayerWantedLevel(playerid, plwl +3);
                    new pname[24];
                    GetPlayerName(playerid, pname, 24);
                    for(new i=0;i<GetMaxPlayers();i++)
                    {
                        if(LawEnforcementRadio[i] == 1) {
                            format(str,sizeof(str),"DISPATCH: (BANK ROBBERY) %s(%d) has robbed LV City Bank",pname,playerid);
                            SendClientMessage(i,COLOR_ROYALBLUE,str);
                        }
                    }
                    format(str,sizeof(str),"%s(%d) has just robbed $%d from LV City Bank",pname,playerid,rcash);
                    SendClientMessageToAll(COLOR_RED,str);
                    BankRobbedRecently = 1;
                    SetTimer("BankRobbedRecentlyTimer",45000,0);
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, red, "ERROR:You need to be in a bank to rob!");
                return 1;
            }
        }
    RecentCrime[playerid] += 200;
    return 1;
    }
In this when i a player spawn ,they can see the red CP icon on the map


Re: I need help - ifly4life - 26.02.2011

I think it creates the checkpoint somewhere else in your script as i cant find were it creates the CP(as i am a little slow sometimes tell me if im rong)


Re: I need help - Ironboy - 26.02.2011

I made cp not in this script
that i made in OnPlayerSpawn


Re: I need help - ifly4life - 26.02.2011

can you show me the code were it creates the CP


Re: I need help - Ironboy - 26.02.2011

this one
pawn Код:
SetPlayerCheckpoint(playerid, 2315.3999,-4.5602,26.7422, 2.0);



Re: I need help - ifly4life - 26.02.2011

hmm, is the CP meant to be in a certain VW or is it default?


Re: I need help - tanush - 27.02.2011

Streamer
Install this as your plugins after on your script add
pawn Код:
#include <streamer>
On Player spawn add
pawn Код:
CreateDynamicCP(2315.3999,-4.5602,26.7422, 1.5, -1, -1, -1, 100.0);
If you need help ask me