Dynamic cp visible to NPCs only
#1

Hey guys.....

How to make an Dynamic CP that would appear only for the NPC 'BusDriver' my NPC id/name is 'BusDriver' i want the BusCP checkpoint appears only for the NPC 'BusDriver' or all npcs idc, but for players, NO

Thanks....
Reply
#2

well why npc need checkpoint?
anyway here is it how you can set checkpoint for only 1 specific player
pawn Код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
Reply
#3

hmmmmmmm
thx anyways, the mistake i did in script that i added the npc's vehicle id as 'BusDriver' xD i was confused, Thanks ANyWays
Reply
#4

guys.
it's not working
the cp is showing for all i'll show you it now
tell me what's the problem
i want it to show only for NPCs i don't care if it's for alll npcs but players musn't see it
and if they was in the bus of the npc and the npc has entered the cp the player(passenger) must pay

see my code:

pawn Код:
new BusCP;
new BusDriver;
OnGameModeInit:
pawn Код:
ConnectNPC("Mark","Bus");
    BusDriver = CreateVehicle(437, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
pawn Код:
BusCP = CreateDynamicCP(1532.7231,-1665.6580,13.5162, 1.2, -1, -1, -1, 100.0);
pawn Код:
if(checkpointid == BusCP)
    {
        new i;
        for(i=0;i<MAX_PLAYERS;i++)if(IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            if(IsPlayerInVehicle(i,BusDriver))
            {
                GivePlayerMoneyEx(i,-25);
            }
        }
    }
Reply
#5

Why on earth would you want to show a checkpoint for an NPC? It probably wouldn't even work. NPCs aren't actual clients - they aren't actually running any code from GTA itself - they're just reading a file and sending it to the server, therefore checkpoint detection likely wouldn't work (unless it's handled by the server, which I'm 99.9999999% sure it's not).
Reply
#6

oh my god, let's start again.

when the npc has stepped on the cp while im in the npc's car it made me pay so it's working actually
but the problem that the cp is showing for all, i want it to show for npc only
Reply
#7

Did you even bother to read past the first sentence in my reply? I'm not going to waste my time in this topic; /out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)