02.04.2011, 14:26
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;
}