ARNPC set pos
#1

hy. why dont set this a pos? the skin and the agle is loaded, and set to the npc. but the pos not.. i create a debug, and 'printf' when npc spawn, the npc-s NpcInfo[npcid][npcX]-value.. and its ok, but setpos dosent work. why?

load:
PHP код:
                   mysql_fetch_field_row(data"x"); NpcInfo[npcid][npcX] = floatstr(data);
                   
mysql_fetch_field_row(data"y"); NpcInfo[npcid][npcY] = floatstr(data);
                   
mysql_fetch_field_row(data"z"); NpcInfo[npcid][npcZ] = floatstr(data);
                   
mysql_fetch_field_row(data"a"); NpcInfo[npcid][npcA] = floatstr(data); 
On Player Connect:
PHP код:
    if(IsPlayerNPC(playerid))
    {
    
        
SpawnPlayer(playerid);
        new 
npcid NpcInfo[playerid][npcID];
        
SetRNPCFacingAngle(npcidNpcInfo[npcid][npcA]);
        
SetRNPCSkin(npcidNpcInfo[npcid][npcSkin]);
        
SetRNPCPos(npcidNpcInfo[npcid][npcX], NpcInfo[npcid][npcY], NpcInfo[npcid][npcZ]);
    } 
On palyer spawn:
PHP код:
    if(IsPlayerNPC(playerid))
    {
        new 
npcid NpcInfo[playerid][npcID];
        
SetRNPCFacingAngle(npcidNpcInfo[npcid][npcA]);
        
SetRNPCSkin(npcidNpcInfo[npcid][npcSkin]);
        
SetRNPCPos(npcidNpcInfo[npcid][npcX], NpcInfo[npcid][npcY], NpcInfo[npcid][npcZ]);
        new 
Float:xFloat:yFloat:z;
        
GetRNPCPos(npcidyz);
         return 
1;
    } 
Reply
#2

anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)