PDA

View Full Version : Dynamic cp visible to NPCs only


GoldZoroGrab
11/05/2013, 06:21 PM
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....

RedCrossER
11/05/2013, 06:47 PM
well why npc need checkpoint?
anyway here is it how you can set checkpoint for only 1 specific player
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);

GoldZoroGrab
11/05/2013, 06:53 PM
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

GoldZoroGrab
11/05/2013, 08:12 PM
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:

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

MP2
11/05/2013, 08:47 PM
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).

GoldZoroGrab
11/05/2013, 08:49 PM
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

MP2
11/05/2013, 08:50 PM
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.