06.07.2011, 18:30
I just did a npc that enter bus in red county and he drive there
I did an record buy the problem I think he can't login
I see him inside the server with orange color above his name but he fly above San Fierro, I think he cant login or register
Here is the code
Please help
I did an record buy the problem I think he can't login
I see him inside the server with orange color above his name but he fly above San Fierro, I think he cant login or register
Here is the code
PHP код:
public OnGameModeInit()
{
ConnectNPC("james","bus"); // The name of your NPC and the record. The record need to match an record with the same name. The NPC name can be anything
bus = AddStaticVehicle(437,251.2450,-69.4936,1.5635,89.8581,0,1); // Creating your vehicle, this can be done ingame by typing /save. Then go to your SA-MP folder and find the folder "savedpositions"
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
new playername[64]; //Player String
GetPlayerName(playerid,playername,64); //This is to get the NPC's name
if(!strcmp(playername, "james", true)) { // Detecting if the NPC is spawned. If it is not spawned or the name is wrong, nothing will happend
SetPlayerColor(playerid,0xFFFFFFFF); // Chose any color you want, this is currently white
PutPlayerInVehicle(playerid, bus, 0);
}
return 1;
}