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; }
I informed Alex that the CNPC plugin could be released on the SA-MP forum providing it wasn't used to abuse the server list with fake players. The person who was updating it for 0.3c added functions to create fake players - which is against the service agreement. After doing some research on the guy who was updating CNPC, I don't think adding the fake players was a careless error - it was very intentional and designed to cause harm to SA-MP. I'd just like to add that we have means to determine if a server is faking their player count and any servers found with fake players are blocked from listing on our server lists. |
SetNPCPos(npcid, 1244.3234, 1234. 4354, 13.5143);
I downloaded 0.3c version before it got closed, but it's very difficult to use!! I tried a lot of things, for example it doesn't spawn on the position I insert.
pawn Код:
https://sampforum.blast.hk/showthread.php?tid=161901 or http://forum.sa-mp.com/showthread.ph...ght=connectNPC PS: HUGE CLUCKER!!!!!! =) |
SetSpawnInfo(npcid,0,256, 2432.113037, -1232.722656, 24.875465,0.0,0,0,0,0,0,0);
SpawnNPC(npcid);
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, ![]() |
ConnectNPC(name, NPC[id][npcname]);