Re: NPC leaves server after joining -
Ricop522 - 11.02.2010
Bump
Re: NPC leaves server after joining -
WThieves - 11.02.2010
I got mine to work on the gf gamemode but unfortunately i just got the one with ID:0 to work
If you want to know what i did here it is:
First look a bit of posts back to one of me this solves a little then do thus under onplayerconnect:
pawn Код:
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid))
{
return OnPlayerSpawn(playerid);//yeah it maybe sounds strange but it works :P
}
//all your other shitload untill
}
Then i also should say you should merge the npc's with your gm and when you do the thing under onplayerspawn do this:
pawn Код:
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "EXAMPLENPC", true))
{
PutPlayerInVehicle(playerid, Timscar, 0);
SetPlayerSkin(playerid, 192);
SetPlayerColor(playerid, C_DRL);
}
}
see what i did? no more return's!
but i'll try to figure out how to make the other 12 work!
oh yeah also keep an eye on this:
http://forum.sa-mp.com/index.php?topic=152222.0
Re: NPC leaves server after joining -
Ricop522 - 12.02.2010
Quote:
Originally Posted by WThieves
I got mine to work on the gf gamemode but unfortunately i just got the one with ID:0 to work
If you want to know what i did here it is:
First look a bit of posts back to one of me this solves a little then do thus under onplayerconnect:
pawn Код:
public OnPlayerConnect(playerid) { if(IsPlayerNPC(playerid)) { return OnPlayerSpawn(playerid);//yeah it maybe sounds strange but it works :P } //all your other shitload untill }
Then i also should say you should merge the npc's with your gm and when you do the thing under onplayerspawn do this:
pawn Код:
if(IsPlayerNPC(playerid)) { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); if(!strcmp(npcname, "EXAMPLENPC", true)) { PutPlayerInVehicle(playerid, Timscar, 0); SetPlayerSkin(playerid, 192); SetPlayerColor(playerid, C_DRL); } }
see what i did? no more return's!
but i'll try to figure out how to make the other 12 work!
oh yeah also keep an eye on this: http://forum.sa-mp.com/index.php?topic=152222.0
|
bump ='/
Re: NPC leaves server after joining -
Sew_Sumi - 12.02.2010
Man you need to fix the game mode...
It's the old if !IsPlayerNPC...
You need to read more regarding the 0.3 NPC Scripting...
It has been SOOOOOO told over and over, and searching on !IsPlayerNPC will point out how to fix the issue.
Re: NPC leaves server after joining -
WThieves - 12.02.2010
Quote:
Originally Posted by Sew_Sumi
Man you need to fix the game mode...
It's the old if !IsPlayerNPC...
You need to read more regarding the 0.3 NPC Scripting...
It has been SOOOOOO told over and over, and searching on !IsPlayerNPC will point out how to fix the issue.
|
What the hell are you talking about? the first time npcs ware ever made was in 0.3a!
Re: NPC leaves server after joining -
Ricop522 - 12.02.2010
bump
Re: NPC leaves server after joining -
V1ceC1ty - 12.02.2010
Stop bumping.
Filterscript:
pawn Код:
public OnGameModeInit()
{
ConnectNPC("NPCNAME","RECORDINGNAME");
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"NPCNAME",true)) {
SetSpawnInfo( playerid, 0, 12, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 );
PutPlayerInVehicle(playerid, VEHICLENAME, 0);
}
return 1;
}
NPCMode:
pawn Код:
#define RECORDING "NPCNAME"
#define RECORDING_TYPE 1 // 2 for on foot 1 for in a vehicle
#include <a_npc>
main(){}
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
If that doesn't work then make sure the .rec files are in \yoursampserver\npcmodes\recordings\.
If it still doesn't work then re-download samp server.
Have you tried using the NPC's without GF to see if they work?
Re: NPC leaves server after joining -
Ricop522 - 12.02.2010
Quote:
Originally Posted by V1ceC1ty
Stop bumping.
Filterscript:
pawn Код:
public OnGameModeInit() { ConnectNPC("NPCNAME","RECORDINGNAME"); return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) return 1;
new playername[64]; GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"NPCNAME",true)) { SetSpawnInfo( playerid, 0, 12, 1958.33, 1343.12, 15.36, 269.15, 31, 1000, 0, 0, 0, 0 ); PutPlayerInVehicle(playerid, VEHICLENAME, 0); } return 1; }
NPCMode:
pawn Код:
#define RECORDING "NPCNAME" #define RECORDING_TYPE 1 // 2 for on foot 1 for in a vehicle
#include <a_npc> main(){} public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
If that doesn't work then make sure the .rec files are in \yoursampserver\npcmodes\recordings\.
If it still doesn't work then re-download samp server.
Have you tried using the NPC's without GF to see if they work?
|
did not work, but I tested one of the gamemodes samp server and it worked perfectly ... tried in LVDM and ran ... only GF that is not working
Re: NPC leaves server after joining -
V1ceC1ty - 12.02.2010
Well then its a GF problem.
Re: NPC leaves server after joining -
Ricop522 - 12.02.2010
Quote:
Originally Posted by V1ceC1ty
Well then its a GF problem.
|
You got to put?
Re: NPC leaves server after joining -
Ricop522 - 12.02.2010
help
bump
Re: NPC leaves server after joining -
WThieves - 12.02.2010
Quote:
Originally Posted by Ricop522
Quote:
Originally Posted by V1ceC1ty
Well then its a GF problem.
|
You got to put?
|
it's true it's a gf problem and i am the only one trying to figure it out right now
Re: NPC leaves server after joining -
Ricop522 - 12.02.2010
heelp....
Re: NPC leaves server after joining -
Ricop522 - 13.02.2010
bump
Re: NPC leaves server after joining -
Sew_Sumi - 13.02.2010
Quote:
Originally Posted by WThieves
Quote:
Originally Posted by Sew_Sumi
Man you need to fix the game mode...
It's the old if !IsPlayerNPC...
You need to read more regarding the 0.3 NPC Scripting...
It has been SOOOOOO told over and over, and searching on !IsPlayerNPC will point out how to fix the issue.
|
What the hell are you talking about? the first time npcs ware ever made was in 0.3a!
|
And IsPlayerNPC is FOR that...
Are you not trying to help here??
and as stated in the other posts here and the other threads about NPCs having issues, you need to go through the game mode, and put...
if(IsPlayerNPC(playerid)) return 1;
In the callbacks, and timers that are for the Players, and not NPCs...
Honestly, Search and Read first... and most of all, Read what people reply with, before making trouble.
0.3 has almost been out for at least 6 months already. A LOT of the questions that regard this ARE ASKED ALREADY.
if(IsPlayerNPC(playerid)) return 1;
Re: NPC leaves server after joining -
Ma - 13.02.2010
I changed to another roleplay gamemode and now they work, the godfather is just to buggy.
Re: NPC leaves server after joining -
Ricop522 - 13.02.2010
Quote:
Originally Posted by Ma
I changed to another roleplay gamemode and now they work, the godfather is just to buggy.
|
Could you pass the GameMode it work? (topic)
Re: NPC leaves server after joining -
Ma - 15.02.2010
Quote:
Originally Posted by Ricop522
Quote:
Originally Posted by Ma
I changed to another roleplay gamemode and now they work, the godfather is just to buggy.
|
Could you pass the GameMode it work? (topic)
|
http://forum.sa-mp.com/index.php?topic=148926.0
Re: NPC leaves server after joining -
Sew_Sumi - 16.02.2010
LOL, the first post states that this indeed is a GF edit...
And as for your "buggy" complaints, well...
It took me 5-10 minutes to convert the GF gamemode to 0.3...
What you WANT is someone to do this all for you, and you don't seem like you're interested in doing it yourself.
After all, Thats why people don't really like GF... Everybody just posts questions up without searching or even attempting to find help in the correct topic...
As I said, if(IsPlayerNPC(playerid))return 1;
Re: NPC leaves server after joining -
Ma - 17.02.2010
Quote:
Originally Posted by Sew_Sumi
LOL, the first post states that this indeed is a GF edit...
And as for your "buggy" complaints, well...
It took me 5-10 minutes to convert the GF gamemode to 0.3...
What you WANT is someone to do this all for you, and you don't seem like you're interested in doing it yourself.
After all, Thats why people don't really like GF... Everybody just posts questions up without searching or even attempting to find help in the correct topic...
As I said, if(IsPlayerNPC(playerid))return 1;
|
As I said, this didn't work, I was doing it myself for hours and I searched the net + this forum for hours before I placed this topic.
Also my godfather version was an old version of the crappy SARP script, but it suck anyway.