Problem With Npc's.
#1

Why, with this script, change only botweap skin?
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid))
    {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname));
    if(!strcmp(npcname, "botbus", true))
    {
      PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
    }
    return 1;
    }
    PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
    if(IsPlayerNPC(playerid))
    {
    new npc_name[24];
    GetPlayerName(playerid,npc_name,sizeof(npc_name));
    if(!strcmp(npc_name,"botweap",false))
    {
    SetPlayerSkin(playerid, 23);
    }
    return 1;
    }
    if(IsPlayerNPC(playerid))
    {
    new npc_name[24];
    GetPlayerName(playerid,npc_name,sizeof(npc_name));
    if(!strcmp(npc_name,"botweapon",false))
    {
    SetPlayerSkin(playerid, 30);
    }
    return 1;
    }
    return 1;
}
Reply
#2

Код:
    if(!strcmp(npc_name,"botweapon",false))
to.....

Код:
    if(!strcmp(npc_name,"botweapon",true))
This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds. (THE FUCK?)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)