26.05.2011, 21:19
nгo mecho muito com npc's entгo tente:
pawn Код:
new g[2];
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(g[1], npcname, sizeof(npcname));
if(!strcmp(npcname, "mecanico", true))
{
SetPlayerSkin(playerid,50);
return 1;
}
return 1;
}
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(g[1], npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "Policial", true))
{
SetPlayerSkin(playerid,280);
return 1;
}
}
return 1;
}
public OnGameModeInit()
{
g[0] = ConnectNPC("Policia","Policial");
g[1] = ConnectNPC("Mecanico","mecanico");
return 1;
}