10.04.2011, 14:08
Quote:
The strcmp function returns 0 if the strings match, so change 'strcmp' to '!strcmp'
|
They got CJ skin. And they dont have the text label over em.
New code:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "butler1", true))
{
SetPlayerSkin(playerid, 172);
SetPlayerColor(playerid,COLOR_WHITE);
label[playerid] = Create3DTextLabel("Butler - Press F to speak to me",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
}
if(!strcmp(npcname, "Weapon", true))
{
SetPlayerSkin(playerid, 171);
SetPlayerColor(playerid,COLOR_WHITE);
label2[playerid] = Create3DTextLabel("Weapon Dealer - Press F to speak to me",COLOR_RED,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label2[playerid], playerid, 0.0, 0.0, 0.7);
}
return 1;
}
SetPlayerPos(playerid, 1477.6693,-1565.2162,23.5469);
return 1;
}