stock CreateStandingNPC(npcname[], Float:x, Float:y, Float:z, angle,skin)
{
new
npcid=GetPlayerID(npcname);
if(npcid != INVALID_PLAYER_ID && IsPlayerConnected(npcid))
{
if(IsPlayerNPC(npcid) && used < 100)
{
printf("[npc:update] (%i)%s NPC CREATED!!", npcid, npcname, used);
SetPlayerPos(npcid, x, y, z);
SetPlayerFacingAngle(npcid, angle);
npcs[used] = npcid;
++used;
SetPlayerSkin(npcid,skin);
return 1;
}
}
return 0;
}
|
Originally Posted by BMUK
Angle is a float too
|
stock CreateStandingNPC(npcname[], Float:x, Float:y, Float:z, Float:a, skin)
{
new
npcid=GetPlayerID(npcname);
if(npcid != INVALID_PLAYER_ID && IsPlayerConnected(npcid))
{
if(IsPlayerNPC(npcid) && used < 10)
{
printf("[npc:update] (%i)%s NPC CREATED!!", npcid, npcname, used);
SetPlayerPos(npcid, x, y, z);
SetPlayerFacingAngle(npcid,a);
SetPlayerSkin(npcid,skin);
npcs[used] = npcid;
++used;
return 1;
}
}
return 0;
}
CreateStandingNPC("Natasha",360.5411,173.7128,1009.1094,265.1596,129); // WARNINGS
: warning 213: tag mismatch : warning 202: number of arguments does not match definition