ALL HELP ME~! -
ZombieNest - 12.01.2014
I made a NPC loading filterscript fo'my server in which i test my makings but when i do /loadnpcs it niether shows the Message or the NPC loaded but the filterscript gets loaded it in Server.exe and when i type /loadnpcs in server it dosent shows anything not the Unknown Command also....Help!
Код:
// NPC Loader Of Drifter/Tony Peterson RGRP //
// Own Made For Server Testing //
#include <a_samp>
#include <a_npc>
#if defined FILTERSCRIPT
}
#define COLOR_GREEN 0x33AA33AA
{
public OnFilterScriptInit()
}
print("\n--------------------------------------");
print(" NPC Loader 2014-Tony Peterson/Drifter");
print("--------------------------------------\n");
return 1;
public OnNPCDisconnect(Kicked,Banned[])
{
printf("Disconnected from the server. %s", Reason: (Kicked,Banned) );
}
( ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
( ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "/loadnpcs", true) == 0)
{
( ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
( ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
}
SSCANF_Join(0,Fbi_Guard_1,Fbi_Guard_1)
SSCANF_Join(1,Hospital_Guard_1,Hospital_Guard_1)
{
SendClientMessageToAll(0x33AA33AA,NPC's Are Loaded!)
SendClientMessage(playerid,0x33AA33AA,You have loaded the NPC's!)
SendClientMessage(playerid,COLOR_GREEN,NPC Loaded)
}
public OnPlayerSpawn()
{
if(IsPlayerNPC(playerid))
}
SetPlayerSkin(playerid,286);
GivePlayerWeapon(playerid,38**,99999);
return 1;
{
public OnFilterScriptExit()
}
SSCANF_Leave(0)
SSCANF_Leave(1)
return 1;
}
#else
#endif
I use the NPC Generator NPC Maker
Help me i want to know why it dosent work and when i change if defined filterscript to define filterscript alot of error comes
Re: ALL HELP ME~! -
Eth - 12.01.2014
you have to compile ur filterscript first.......
if you got errors you have to fix it
Re: ALL HELP ME~! -
ZombieNest - 14.01.2014
Its Compiling!!!But When i type command in the game and nor the message shows or the unknown command
Re: ALL HELP ME~! -
Sawalha - 14.01.2014
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "/loadnpcs", true) == 0)
{
ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
SSCANF_Join(0,Fbi_Guard_1,Fbi_Guard_1);
SSCANF_Join(1,Hospital_Guard_1,Hospital_Guard_1);
SendClientMessageToAll(0x33AA33AA,"NPC's Are Loaded!");
SendClientMessage(playerid,0x33AA33AA,"You have loaded the NPC's!");
SendClientMessage(playerid,COLOR_GREEN," NPC Loaded");
return 1;
}
return 0;
}
You forgot return 1; and return 0; ..
and the other problem about to define a filterscript , Under #includes do:
and remove
and
and last thng, remove OnGamodeModeInit, and OnGameModeExit.
Just keep main() and onfilterscriptinit and onfilterscriptexit. hope works.
Re: ALL HELP ME~! -
ZombieNest - 15.01.2014
dosent works....The error i got is
Код:
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(8) : error 054: unmatched closing brace ("}")
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(10) : error 055: start of function body without function header
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(12) : error 029: invalid expression, assumed zero
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(16) : error 010: invalid function or declaration
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(18) : warning 235: public function lacks forward declaration (symbol "OnNPCDisconnect")
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(20) : warning 213: tag mismatch
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(22) : error 010: invalid function or declaration
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(29) : error 017: undefined symbol "strtok"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(29) : error 033: array must be indexed (variable "cmd")
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(32) : error 017: undefined symbol "Fbi_Guard_1"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(33) : error 017: undefined symbol "Hospital_Guard_1"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(35) : error 017: undefined symbol "SSCANF_Join"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(36) : error 017: undefined symbol "SSCANF_Join"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(42) : warning 225: unreachable code
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(42) : warning 217: loose indentation
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(42) : error 029: invalid expression, assumed zero
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(42) : error 004: function "OnFilterScriptExit" is not implemented
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(28) : warning 203: symbol is never used: "idx"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(28 -- 47) : error 036: empty statement
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(28 -- 47) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
15 Errors.
The Filterscript i changed
Код:
// NPC Loader Of Drifter/Tony Peterson RGRP //
// Own Made For Server Testing //
#include <a_samp>
#include <a_npc>
#define FILTERSCRIPT
}
#define COLOR_GREEN 0x33AA33AA
{
public OnFilterScriptInit()
}
print("\n--------------------------------------");
print(" NPC Loader 2014-Tony Peterson/Drifter");
print("--------------------------------------\n");
return 1;
public OnNPCDisconnect(Kicked,Banned[])
{
printf("Disconnected from the server. %s", Reason: (Kicked,Banned) );
}
( ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
( ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "/loadnpcs", true) == 0)
{
ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
SSCANF_Join(0,Fbi_Guard_1,Fbi_Guard_1);
SSCANF_Join(1,Hospital_Guard_1,Hospital_Guard_1);
SendClientMessageToAll(0x33AA33AA,"NPC's Are Loaded!");
SendClientMessage(playerid,0x33AA33AA,"You have loaded the NPC's!");
SendClientMessage(playerid,COLOR_GREEN," NPC Loaded");
return 1;
public OnFilterScriptExit()
}
return 0;
}
main()
Re: ALL HELP ME~! -
MatriXgaMer - 15.01.2014
pawn Код:
// NPC Loader Of Drifter/Tony Peterson RGRP //
// Own Made For Server Testing //
#include <a_samp>
#include <a_npc>
#define FILTERSCRIPT
//Define
#define COLOR_GREEN 0x33AA33AA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" NPC Loader 2014-Tony Peterson/Drifter");
print("--------------------------------------\n");
return 1;
}
public OnNPCDisconnect(Kicked,Banned[])
{
printf("Disconnected from the server. %s", Reason: (Kicked,Banned) );
( ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
( ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "/loadnpcs", true) == 0)
{
ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
SSCANF_Join(0,Fbi_Guard_1,Fbi_Guard_1);
SSCANF_Join(1,Hospital_Guard_1,Hospital_Guard_1);
SendClientMessageToAll(0x33AA33AA,"NPC's Are Loaded!");
SendClientMessage(playerid,0x33AA33AA,"You have loaded the NPC's!");
SendClientMessage(playerid,COLOR_GREEN," NPC Loaded");
return 1;
}
}
public OnFilterScriptExit()
{
return 0;
}
main()
{
}
Re: ALL HELP ME~! -
ZombieNest - 17.01.2014
New Error I got:::::
Код:
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(17) : warning 235: public function lacks forward declaration (symbol "OnNPCDisconnect")
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(19) : warning 213: tag mismatch
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(20) : error 017: undefined symbol "Fbi_Guard_1"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(20) : error 001: expected token: ")", but found ";"
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(20 -- 21) : error 035: argument type mismatch (argument 1)
C:\Users\aa\Desktop\RGRP\filterscripts\npc_loader.pwn(20 -- 21) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: ALL HELP ME~! -
PowerPC603 - 17.01.2014
pawn Код:
// NPC Loader Of Drifter/Tony Peterson RGRP //
// Own Made For Server Testing //
#include <a_samp>
#include <a_npc>
#define FILTERSCRIPT
#define COLOR_GREEN 0x33AA33AA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" NPC Loader 2014-Tony Peterson/Drifter");
print("--------------------------------------\n");
return 1;
}
public OnNPCDisconnect(Kicked,Banned[])
{
printf("Disconnected from the server. %s", Reason: (Kicked,Banned) );
ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd, "/loadnpcs", true) == 0)
{
ConnectNPC(Fbi_Guard_1[],Fbi_Guard_1[]);
ConnectNPC(Hospital_Guard_1[],Hospital_Guard_1[]);
SSCANF_Join(0,Fbi_Guard_1,Fbi_Guard_1);
SSCANF_Join(1,Hospital_Guard_1,Hospital_Guard_1);
SendClientMessageToAll(0x33AA33AA,"NPC's Are Loaded!");
SendClientMessage(playerid,0x33AA33AA,"You have loaded the NPC's!");
SendClientMessage(playerid,COLOR_GREEN," NPC Loaded");
return 1;
}
return 0;
}
public OnFilterScriptExit()
{
return 0;
}
main() {}