03.03.2014, 17:30
What lines should I add to my npc has a name in her head
Код:
#include <a_samp> new mesera; public OnGameModeInit() { ConnectNPC("Jenny_Laurent","mesera"); mesera = AddStaticVehicle(420,2044.8854,1473.2106,10.4494,181.3339,6,1); // van return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //Checks if the player is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Gets the NPC's name if(!strcmp(npcname, "Jenny_Laurent", true)) //Checks if the NPC's name is Driver { PutPlayerInVehicle(playerid, mesera, 0); //Puts the NPC into the van. } } return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/mycommand", cmdtext, true, 10) == 0) { // Do something here return 1; } return 0; }