Jump to content
  • 0

problema noua npc


Question

15 answers to this question

Recommended Posts

Posted

LOL ... pe camp ? Vai de steaua lui de NPC.Uite aici :

[pawn]//-------------------------------------------------------------------------------------------------------

#include <a_samp>

//-------------------------------------------------------------------------------------------------------

new Vehiculul; // Numele vehiculului.

//-------------------------------------------------------------------------------------------------------

public OnGameModeInit()

{

        ConnectNPC("NPC","Inregistrare"); // Schimba NPC cu numele NPC-ului si Inregistrare cu numele inregistrari.

        Vehiculul = AddStaticVehicle(448,2076.4067,2227.7834,10.4165,178.8465,6,6);

        return 1;

}

//-------------------------------------------------------------------------------------------------------

public OnPlayerSpawn(playerid)

{

    if(!IsPlayerNPC(playerid)) return 0;

    new playername[64];

    GetPlayerName(playerid,playername,64);

    if(!strcmp(playername, "NPC", true)) // Schimba NPC cu numele NPC-ului tau.

    SetSpawnInfo( playerid, 0, 255, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0 );

    SetPlayerColor(playerid,0xFFFFFFFF); // Schimba culoarea.Momentan este alb.

    PutPlayerInVehicle(playerid, Vehiculul, 0);

  return 1;

}

//-------------------------------------------------------------------------------------------------------

public OnPlayerConnect(playerid)

{

        if(IsPlayerNPC(playerid)) {

            new ip_addr_npc[64+1];

            new ip_addr_server[64+1];

            GetServerVarAsString("bind",ip_addr_server,64);

            GetPlayerIp(playerid,ip_addr_npc,64);

            if(!strlen(ip_addr_server)) {

            ip_addr_server = "127.0.0.1";

            }

            if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {

            printf("NPC: Se primeste o conectiune de la %s.Primeste kick.",ip_addr_npc);

            Kick(playerid);

            return 0;

            }

            printf("NPC : Conectiunea de la %s este permisa.",ip_addr_npc);

        }

        return 1;

}

//-------------------------------------------------------------------------------------------------------[/pawn]

Posted

chestia cu on player connect este obligatorie?  si cand adaug masina trebuie sa dau save de unde incep inregistrarea? la fel si la setplayerinfo?

Snapshot_2012_03_07_003934.jpg
Posted

imi da asta http://www.gf-image.com/upload/63cdb0f083446f6ecbeb6c599cb793f2.png  iese de pe server ... stai lin numele e la caterinca... stie cineva sa il faca?

Snapshot_2012_03_07_003934.jpg
Posted

Ai pus asa ? :

[pawn]public OnGameModeInit()

{

        ConnectNPC("NPC","Inregistrare"); // Schimba NPC cu numele NPC-ului si Inregistrare cu numele inregistrari.

        Vehiculul = AddStaticVehicle(448,2076.4067,2227.7834,10.4165,178.8465,6,6);

        return 1;

}[/pawn]

si asa ? :

[pawn]public OnPlayerConnect(playerid)

{

        if(IsPlayerNPC(playerid)) {

            new ip_addr_npc[64+1];

            new ip_addr_server[64+1];

            GetServerVarAsString("bind",ip_addr_server,64);

            GetPlayerIp(playerid,ip_addr_npc,64);

            if(!strlen(ip_addr_server)) {

            ip_addr_server = "127.0.0.1";

            }

            if(strcmp(ip_addr_npc,ip_addr_server,true) != 0) {

            printf("NPC: Se primeste o conectiune de la %s.Primeste kick.",ip_addr_npc);

            Kick(playerid);

            return 0;

            }

            printf("NPC : Conectiunea de la %s este permisa.",ip_addr_npc);

        }

        return 1;

}[/pawn]

Posted

nimeni?

Cum a spus si Ice , ceri prea mult de la un npc dar ... : http://pastebin.com/f6b7a331a

Poftim ... npc-uri care pot fi omorate.Scriptul a fost facut de wafffllesss.Data viitoare dai si tu un search pe google ;)

Posted

o mica problema fs`ul e bun cand trag in npc moare dar il da si afara de pe server daca il omor si nu mai intra....stie cineva cum pot rezolva?

Snapshot_2012_03_07_003934.jpg
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.