Pawno Problem with NPC - 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)
+--- Thread: Pawno Problem with NPC (
/showthread.php?tid=449542)
Pawno Problem with NPC -
Yordan_Kronos - 09.07.2013
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA
#include <a_samp>
#if defined FILTERSCRIPT
new MyFirstNPCVehicle;
new Text3D:Botinfo;
public OnFilterScriptInit()
{
print("Bus v0.1");
ConnectNPC("Dancho""Bus"); // Line 16
MyFirstNPCVehicle = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
Botinfo = Create3DTextLabel("Red Couty Bus",COLOR_LIGHTBLUE,0.0,0.0,0.0,30.0,0);
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) // Line 39
{
new npcname [MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
SetPlayerSkin(playerid, 256);
if(!strcmp(npcname, "Dancho",true))
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
SetPlayerColor(playerid,0xFFFFFFF);
}
if(!strcmp(npcname, "Dancho",true))
{
Attach3DTextLabelToPlayer(Botinfo, playerid, 0.0,0.0,0.0);
}
return false;
}
pawn Код:
C:\Users\2com\Desktop\bus.pwn(16) : warning 202: number of arguments does not match definition
C:\Users\2com\Desktop\bus.pwn(55) : error 030: compound statement not closed at the end of file (started at line 39)
Please help me to fix it
Re: Pawno Problem with NPC -
Yordan_Kronos - 09.07.2013
How they should be?
Re: Pawno Problem with NPC -
Konstantinos - 09.07.2013
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xAA3333AA
#include <a_samp>
#if defined FILTERSCRIPT
new MyFirstNPCVehicle;
new Text3D:Botinfo;
public OnFilterScriptInit()
{
print("Bus v0.1");
ConnectNPC("Dancho", "Bus"); // You forgot a "," between
MyFirstNPCVehicle = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
Botinfo = Create3DTextLabel("Red Couty Bus",COLOR_LIGHTBLUE,0.0,0.0,0.0,30.0,0);
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) // Line 39
{
new npcname [MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
SetPlayerSkin(playerid, 256);
if(!strcmp(npcname, "Dancho",true))
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
SetPlayerColor(playerid,0xFFFFFFF);
}
if(!strcmp(npcname, "Dancho",true))
{
Attach3DTextLabelToPlayer(Botinfo, playerid, 0.0,0.0,0.0);
}
return false;
}
return 1;
}