13.08.2011, 12:48
pawn Код:
new CarroNPC;
public OnGameModeInit()
{
CarroNPC = CreateVehicle(425, 0.0, 0.0, 0.0, 0.0, 0, 0, -1);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new sStr[23];
GetPlayerName(playerid,sStr,23);
if(!strcmp(sStr,"NomeDoNPC1"))
{
PutPlayerInVehicle(playerid,CarroNPC,0); // Motorista
}
else if(!strcmp(sStr,"NomeDoNPC2"))
{
PutPlayerInVehicle(playerid,CarroNPC,1); // Passageiro
}
}
return 1;
}