NPC nгo Spawna -
eNtinityGaming - 20.02.2014
Bom, criei um npc veнculo Hunter, tudo certinho, nгo tem nada de erro, e tals, gravei ele, segui tudo que estava no tutorial, passo a passo, o npc conecta no servidor, porйm ele nгo spawna ou seja ele nгo aparece
if(IsPlayerNPC(playerid)) return 1;
ja puis isso ai em onplayerconnect, onplayerrequestclass, onplayerdisconnect, no onplayerupdate e uma callback que esqueci o nome, porque esse maldito NPC nгo spawna?
Re: NPC nгo Spawna -
DannielCooper - 20.02.2014
pawn Код:
public OnPlayerConnect(playerid){
if(IsPlayerNPC(playerid))
{
SuaVarQueChecaLogin[playerid] == 1;
return 1;
}
return 1;
}
Re: NPC nгo Spawna -
eNtinityGaming - 20.02.2014
Seria isso?
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(PInfo[playerid][Logged] == 0) return 0;
return 1;
}
@Edit
pawn Код:
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : error 028: invalid subscript (not an array or too many subscripts): "Logged"
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
if(IsPlayerNPC(playerid))
{
Logged[playerid] == 1;
return 1;
}
Re: NPC nгo Spawna -
DannielCooper - 20.02.2014
ONPLAYERCONNECT
pawn Код:
if(IsPlayerNPC(playerid))
{
Logged[playerid] == 1;
SpawnPlayer(playerid);
return 1;
}
Re: NPC nгo Spawna -
eNtinityGaming - 20.02.2014
Continua dando esses 4 errors:
pawn Код:
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : error 028: invalid subscript (not an array or too many subscripts): "Logged"
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2020) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Estб em onplayerconnect, eu sу mostrei um exemplo da Logged.
pawn Код:
if(IsPlayerNPC(playerid))
{
Logged[playerid] == 1;
SpawnPlayer(playerid);
return 1;
}
Re: NPC nгo Spawna -
DannielCooper - 20.02.2014
new Logged[MAX_PLAYERS];
Re: NPC nгo Spawna -
eNtinityGaming - 20.02.2014
Aumentou os erros, ja tem a Logged definida cara...
pawn Код:
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(568) : error 021: symbol already defined: "Logged"
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(1888) : error 033: array must be indexed (variable "Logged")
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(1965) : error 033: array must be indexed (variable "Logged")
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2019) : warning 215: expression has no effect
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(2053) : error 033: array must be indexed (variable "Logged")
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(3208) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(5426) : error 033: array must be indexed (variable "Logged")
C:\Documents and Settings\Vini\Desktop\LSA v1.1 - 0.3z\gamemodes\zumbi.pwn(5701) : error 033: array must be indexed (variable "Logged")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
@EDIT
Coloquei assim e deu certo sem nenhum erro, serб que vai funcionar?
pawn Код:
if(IsPlayerNPC(playerid))
{
PInfo[playerid][Logged] = 1;
SpawnPlayer(playerid);
return 1;
}
Re: NPC nгo Spawna -
DannielCooper - 20.02.2014
Acho que vai sim, eu esqueзo que vocкs usam enum para definir tudo :P
Re: NPC nгo Spawna -
eNtinityGaming - 20.02.2014
Nгo spawnou, sу conecta...
pawn Код:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team
[19:02:14]
[19:02:14] Server Plugins
[19:02:14] --------------
[19:02:14] Loading plugin: Whirlpool
[19:02:14]
[19:02:14] ==================
[19:02:14]
[19:02:14] Whirlpool loaded
[19:02:14]
[19:02:14] ==================
[19:02:14]
[19:02:14] Loaded.
[19:02:14] Loading plugin: streamer
[19:02:14]
*** Streamer Plugin v2.6.1 by Incognito loaded ***
[19:02:14] Loaded.
[19:02:14] Loading plugin: sscanf
[19:02:14]
[19:02:14] ===============================
[19:02:14] sscanf plugin loaded.
[19:02:14] (c) 2009 Alex "******" Cole
[19:02:14] 0.3d-R2 500 Players "dnee"
[19:02:14] ===============================
[19:02:14] Loaded.
[19:02:14] Loaded 3 plugins.
[19:02:15]
[19:02:15] Filterscripts
[19:02:15] ---------------
[19:02:15] Loading filterscript 'antiflood.amx'...
[19:02:15] Loading filterscript 'maxips.amx'...
[19:02:15]
*** Player IP limiting FS (maxips) Loaded. Max connections from 1 IP = 3
[19:02:15] Loading filterscript 'clas.amx'...
[19:02:15] Loading filterscript 'TD.amx'...
[19:02:15]
--------------------------------------
[19:02:15] Text Draw Editor 1.0RC2 by Zamaroht for SA-MP 0.3 Loaded.
[19:02:15] --------------------------------------
[19:02:15] Loading filterscript 'npc_record.amx'...
[19:02:15] Loading filterscript 'fsdebug.amx'...
[19:02:15]
*********************
* SA:MP DEBUG 0.2 *
[19:02:15] * By Simon Campbell *
*********************
[19:02:15] * Version: 0.5d *
*********************
[19:02:15] * -- LOADED *
*********************
[19:02:15] Loaded 6 filterscripts.
[19:02:15] OnGameo
[19:02:15] Loaded 1 vehicles
[19:02:15]
--------------------------------------
[19:02:15] FilterScript No-Flood BY: Spectro_BR
[19:02:15] --------------------------------------
[19:02:15] Number of vehicle models: 49
[19:02:17] Incoming connection: 127.0.0.1:1544
[19:02:17] [npc:join] CapitaoNascimento has joined the server (0:127.0.0.1)
Re: NPC nгo Spawna -
eNtinityGaming - 20.02.2014
Alguem pode me ajudar? O NPC nгo spawna nem fod****