
new bot1,bot2,bot3,bot4,bot5,bot6;
ConnectNPC("AT400_LOS_SANTOS","at400_ls");
ConnectNPC("AT400_LAS_VENTURAS","at400_lv");
ConnectNPC("AT400_SAN_FIERRO","at400_sf");
ConnectNPC("VLAK_LS","VLAK_ls");
ConnectNPC("VLAK_LV","VLAK_lv");
ConnectNPC("VLAK_SF","VLAK_sf");
bot1 = CreateVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // AT400_LOS_SANTOS
bot2 = CreateVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // AT400_LAS_VENTURAS
bot3 = CreateVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // AT400_SAN_FIERRO
bot4 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // VLAK_LS
bot5 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // VLAK_LV
bot6 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // VLAK_SF
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "AT400_LOS_SANTOS", true))
{
PutPlayerInVehicle(playerid, bot1, 0);
return 1;
}
if(!strcmp(npcname, "AT400_LAS_VENTURAS", true))
{
PutPlayerInVehicle(playerid, bot2, 0);
return 1;
}
if(!strcmp(npcname, "AT400_SAN_FIERRO", true))
{
PutPlayerInVehicle(playerid, bot3,0);
return 1;
}
if(!strcmp(npcname, "VLAK_LS", true))
{
PutPlayerInVehicle(playerid, bot4, 0);
return 1;
}
if(!strcmp(npcname, "VLAK_LV", true))
{
PutPlayerInVehicle(playerid, bot5, 0);
return 1;
}
if(!strcmp(npcname, "VLAK_SF", true))
{
PutPlayerInVehicle(playerid, bot6,0);
return 1;
}
return 1;
}
|
Try this
![]() Код:
new bot1,bot2,bot3,bot4,bot5,bot6; Код:
ConnectNPC("AT400_LOS_SANTOS","at400_ls");
ConnectNPC("AT400_LAS_VENTURAS","at400_lv");
ConnectNPC("AT400_SAN_FIERRO","at400_sf");
ConnectNPC("VLAK_LS","VLAK_ls");
ConnectNPC("VLAK_LV","VLAK_lv");
ConnectNPC("VLAK_SF","VLAK_sf");
bot1 = CreateVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // AT400_LOS_SANTOS
bot2 = CreateVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // AT400_LAS_VENTURAS
bot3 = CreateVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // AT400_SAN_FIERRO
bot4 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // VLAK_LS
bot5 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // VLAK_LV
bot6 = AddStaticVehicleEx(538, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000); // VLAK_SF
Код:
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "AT400_LOS_SANTOS", true))
{
PutPlayerInVehicle(playerid, bot1, 0);
return 1;
}
if(!strcmp(npcname, "AT400_LAS_VENTURAS", true))
{
PutPlayerInVehicle(playerid, bot2, 0);
return 1;
}
if(!strcmp(npcname, "AT400_SAN_FIERRO", true))
{
PutPlayerInVehicle(playerid, bot3,0);
return 1;
}
if(!strcmp(npcname, "VLAK_LS", true))
{
PutPlayerInVehicle(playerid, bot4, 0);
return 1;
}
if(!strcmp(npcname, "VLAK_LV", true))
{
PutPlayerInVehicle(playerid, bot5, 0);
return 1;
}
if(!strcmp(npcname, "VLAK_SF", true))
{
PutPlayerInVehicle(playerid, bot6,0);
return 1;
}
return 1;
}
|