08.03.2011, 16:42
Quote:
I have created this script:
Код:
stock CreateNPC(id,name[25],skin,Float:x,Float:y,Float:z,Float:a,interior,vw) { NPC[id][npcname] = name; NPC[id][npcskin] = skin; NPC[id][npcx] = x; NPC[id][npcy] = y; NPC[id][npcz] = z; NPC[id][npca] = a; NPC[id][npcint] = interior; NPC[id][npcvw] = vw; ConnectNPC(name, ?????); } Код:
if(IsPlayerNPC(playerid)) { new checked = -1; for(new i = 0; i < MAX_NPCs; i++) { if(!strcmp(PlayerName2(playerid), NPC[i][npcname], true)) { checked = i; } } if(checked != -1) { SetPlayerInterior(playerid, NPC[checked][npcint]); SetPlayerPos(playerid, NPC[checked][npcx], NPC[checked][npcy], NPC[checked][npcz]); SetPlayerFacingAngle(playerid, NPC[checked][npca]); SetPlayerVirtualWorld(playerid, NPC[checked][npcvw]); SetPlayerSkin(playerid, NPC[checked][npcskin]); } printf("%s correctly spawned!",PlayerName2(playerid)); return 1; } ConnectNPC(name, ??); What should I put on ?? |
pawn Код:
ConnectNPC(name, NPC[id][npcname]);