30.10.2009, 23:13
Hey i have a problem here, i have create one bot just now to test it and it will be a bus bot but the issue is that when the bot spawn it doesnt jump in the bus it does only stay there and do nothing it just looking for bether time or somthing xD well here is a pic on the bot.
This one is under public OnPlayerSpawn(playerid)
This one is under public OnPlayerRequestClass(playerid, classid) but there is some othere things to before this code but it works as i can see.
This one is under public OnGameModeInit()
Here is the bus code.
ass i can se everything looks right so fare an i created the path or what the name was but everything is fine no warnings or error and the bot is spawning but it doesn't jump in the bus/spawn with the bus and drive like i did when i recorded it. before i created this bot i had some few problem from first of all the bot didn't spawn but after some changes and much luck i got it to work but as you can see the bus ain't there with the bot, but is i told you before i created it before but then the bot didn't want to spawn but the bus was there but no bot only the bus. Problems and i need help pluss i dont know whata hell it can be and i have try much but no luck. Thanks for reading and thanks for helping me.
This one is under public OnPlayerSpawn(playerid)
Код:
if(IsPlayerNPC(playerid))//Checks if the player that just spawned is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name. if(!strcmp(npcname, "Iana_Eemeli", true)) //Checking if the NPC's name is Iana_Eemeli { SetPlayerSkin(playerid, 253); PutPlayerInVehicle(playerid, 59, 0); //Putting the NPC into the vehicle we created for it. } return 1; }
Код:
if(!strcmp(npcname, "Iana_Eemeli", true)) { SpawnPlayer(playerid); return 1; }
Код:
ConnectNPC("Iana_Eemeli","buss");
Код:
AddStaticVehicleEx(437, 0.0, 0.0, 5.0, 0.0, 1, 1, 5000); // Bus 59