Ha van regisztrácios rendszer átengedi az npct?
Másold be az npc scriptet.
//----------------------------------[Login & Register]-----------------------------------------------if (strcmp(cmd, \"/login\", true) ==0 ){ if(IsPlayerConnected(playerid)) { new tmppass[64]; if(PLAYERLIST_authed[playerid]) { SendClientMessage(playerid, COLOR_WHITE, \"Te Már bevagy Jelentkezve!\"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"Használat: /login [Jelszó]\"); return 1; } strmid(tmppass, tmp, 0, strlen(cmdtext), 255); Encrypt(tmppass); OnPlayerLogin(playerid,tmppass);}return 1;}if (strcmp(cmd, \"/register\", true) ==0 ){ if(IsPlayerConnected(playerid)) { if(PLAYERLIST_authed[playerid]) { SendClientMessage(playerid, COLOR_WHITE, \"Te Már Bevagy Jelentkezve!\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"%s.user\", sendername); new File: hFile = fopen(string, io_read); if (hFile) { SendClientMessage(playerid, COLOR_YELLOW, \"Ez a Karakternév Már Foglalt!Kérlek Válasz Másikat.\"); fclose(hFile); return 1; } new tmppass[64]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"Használat: /register [Jelszó]\"); return 1; } strmid(tmppass, tmp, 0, strlen(cmdtext), 255); Encrypt(tmppass); OnPlayerRegister(playerid,tmppass);}return 1;}
#include <a_samp>public OnFilterScriptInit ( ){ ConnectNPC(\"asd_asd\", \"teszt\"); return 1;}public OnPlayerSpawn ( playerid ){ if ( IsPlayerNPC ( playerid ) ) { new npcname [ MAX_PLAYER_NAME ]; GetPlayerName ( playerid, npcname, sizeof ( npcname ) ); if ( !strcmp ( npcname, \"asd_asd\", true ) ) { SetPlayerSkin(playerid, 194); } return 1; } return 1;}
#define RECORDING \"teszt\" // Ez az NPC-d neve, melyet felvettél#define RECORDING_TYPE 2 // Az NPC közlekedése, 1 ha jármût vezet, 2 ha gyalogol#include <a_npc> // Az NPC függvénykönyvtár beágyazásapublic OnRecordingPlaybackEnd ( ){ StartRecordingPlayback ( RECORDING_TYPE, RECORDING ); return 0;}#if RECORDING_TYPE == 1 // Ha az NPC típusa jármûves vezetõ public OnNPCEnterVehicle ( vehicleid, seatid ) { StartRecordingPlayback ( RECORDING_TYPE, RECORDING ); return 0; } public OnNPCExitVehicle ( ) { StopRecordingPlayback ( ); return 0; }#else // Viszont ha gyalogos public OnNPCSpawn ( ) { StartRecordingPlayback ( RECORDING_TYPE, RECORDING ); return 0; }#endif
public OnPlayerConnect( playerid ){ if ( IsPlayerNPC ( playerid ) ) { new npcname [ MAX_PLAYER_NAME ]; GetPlayerName ( playerid, npcname, sizeof ( npcname ) ); if ( !strcmp ( npcname, \"asd_asd\", true ) ) { SetPlayerSkin(playerid, 194); } return 1; }