06.11.2015, 15:20
Hi guys, I trying to put a NPC in a train. Don't can create a train with CreateVehicle, I need AddStaticVehicleEx. Then...
global variable
OnGameModeInit
OnPlayerSpawn
NPC is connect and I can see it but he don't spawn in the vehicle. What I can do?
global variable
PHP код:
new trainveh;
PHP код:
ConnectNPC("train", "train");
trainveh = AddStaticVehicleEx(538, 0.0, 0.0, 0.0, 0.0, 0, 0, 1);
PHP код:
if(IsPlayerNPC(playerid))
{
new npcname[24];
GetPlayerName(playerid, npcname, 24);
if(!strcmp(npcname, "train", true))
{
SetPlayerSkin(playerid, 255);
PutPlayerInVehicle(playerid, trainveh, 0);
}
return 1;
}