new SpawnVeiculoTaxista;
public OnGameModeInit()
{
print("meu gamemode");
ConnectNPC("Taxista","taxista");
SpawnVeiculoTaxista = CreateVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "taxista", true))
{
PutPlayerInVehicle(playerid, SpawnVeiculoTaxista, 0);
}
return 1;
}
public OnGameModeInit()
{
print("meu gamemode");
ConnectNPC("Taxista","taxista");
SpawnVeiculoTaxista = AddStaticVehicle(420, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
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, "taxista", true)) //Checking if the NPC's name is taxista
{
PutPlayerInVehicle(playerid, SpawnVeiculoTaxista, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
}
return 1;
}
next time, use this http://forum.sa-mp.com/forumdisplay.php?f=33
|