[11:16:54]
[11:16:54] KoN
[11:16:54] Autor: Legend-Chevi
[11:16:54] San Fierro Killer Team Death Match
[11:16:54] _____________________________________________________
[11:16:54] Number of vehicle models: 190
[11:16:54] [connection] 127.0.0.1:62815 requests connection cookie.
[11:16:54] [connection] 127.0.0.1:62816 requests connection cookie.
[11:16:55] [connection] incoming connection: 127.0.0.1:62815 id: 0
[11:16:55] [connection] incoming connection: 127.0.0.1:62816 id: 1
[11:16:56] [npc:join] Officerino has joined the server (0:127.0.0.1)
[11:16:56] [npc:join] NPC has joined the server (1:127.0.0.1)
[11:17:02] [connection] 127.0.0.1:62817 requests connection cookie.
[11:17:04] [connection] incoming connection: 127.0.0.1:62817 id: 2
[11:17:09] [npc:part] NPC has left the server (1:0)
[11:17:09] [connection] 127.0.0.1:62818 requests connection cookie.
[11:17:09] [connection] 127.0.0.1:62819 requests connection cookie.
[11:17:09] [connection] 127.0.0.1:62820 requests connection cookie.
[11:17:10] [connection] incoming connection: 127.0.0.1:62818 id: 1
[11:17:10] [connection] incoming connection: 127.0.0.1:62819 id: 2
[11:17:10] [npc:join] NPC has joined the server (1:127.0.0.1)
[11:17:10] [connection] incoming connection: 127.0.0.1:62820 id: 2
[11:17:14] [connection] incoming connection: 127.0.0.1:62821 id: 2
[11:17:14] [join] Legend_Chevi has joined the server (2:127.0.0.1)
public OnPlayerConnect(playerid)
{
if (IsPlayerNPC(playerid)) return 1;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(IsPlayerNPC(playerid)) return 1;
return 1;
}
PHP код:
PHP код:
|
public OnPlayerConnect(playerid)
{
if (IsPlayerNPC(playerid)) {
playertarget[playerid] = Create3DTextLabel(" ", 0xFFFFFFFF, 30.0, 40.0, 50.0, 100.0, 0, 1);
Attach3DTextLabelToPlayer(playertarget[playerid], playerid, 0.0, 0.0, 0.2);}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if (IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "Officerino", true))// Your npc name here
{
CreateRNPCPolice ("Officerino", rpid[random(2)]);
new rp2 = ConnectRNPC("Officerino");
AddRPOLWaypoint (rp2, 2029.42, 1354.34, 10.5);
AddRPOLWaypoint (rp2, 2033.55, 1286.21, 10.5);
AddRPOLWaypoint (rp2, 2029.42, 1354.34, 10.5);
AddRPOLWaypoint (rp2, 2033.55, 1286.21, 10.5);
SetTimerEx ("Route2", 500, 0, "i", playerid);
}
else if(!strcmp(npcname, "NPC", true))// Your npc name here
{
CreateRNPCPolice ("NPC", rpid[random(2)]);
new pol2 = ConnectRNPC("NPC");
AddRPOLWaypoint (pol2, 2029.42, 1354.34, 10.5);
AddRPOLWaypoint (pol2, 2033.55, 1286.21, 10.5);
AddRPOLWaypoint (pol2, 2029.42, 1354.34, 10.5);
AddRPOLWaypoint (pol2, 2033.55, 1286.21, 10.5);
SetTimerEx ("Route3", 500, 0, "i", playerid);
}
}
return 1;
}
i have put this, is it right??
PHP код:
|
public OnPlayerConnect(playerid)
{
if (IsPlayerNPC(playerid)) {
playertarget[playerid] = Create3DTextLabel(" ", 0xFFFFFFFF, 30.0, 40.0, 50.0, 100.0, 0, 1);
Attach3DTextLabelToPlayer(playertarget[playerid], playerid, 0.0, 0.0, 0.2);
return 0;} //<------------- Here
return 1;
}