I tryed but didnt found it
#1

I got a rank system, but I dont want that NPC's gets the rank. I tryed somethings with IsPlayerNpc, but I got errors, maybe you guys now what to add?
Here my filterscript:
pawn Код:
public OnPlayerSpawn(playerid)
{
    new title[64];
    switch(GetPlayerScore(playerid)) {
        case 0..50:     format(title,sizeof(title),"Newbie Trucker");
        case 51..100:   format(title,sizeof(title),"Trucker in training");// Trucker in training
        case 101..200:  format(title,sizeof(title),"GoodTrucker"); // GoodTrucker
        case 201..500:  format(title,sizeof(title),"Junior Trucker"); // Junior Trucker
        case 501..1000: format(title,sizeof(title),"Senior Trucker");// Senior Trucker
        case 1001..1500:format(title,sizeof(title),"Trucker"); // Trucker
        case 1501..2000:format(title,sizeof(title),"Teansport Trucker"); // Transport Trucker
        case 2001..2500:format(title,sizeof(title),"Licensed Trucker"); // Licensed Trucker
        case 2501..3000:format(title,sizeof(title),"European Trucker"); // European Trucker
        case 3001..3500:format(title,sizeof(title),"World Trucker"); // "World Trucker"
        default:format(title,sizeof(title),"World European Trucker"); // World European Trucker
    }
    if(!LabelSet[playerid]) {
        label[playerid] = Create3DTextLabel(title,RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.4);
        LabelSet[playerid] = true;
    } else {
        Delete3DTextLabel(label[playerid]);
        label[playerid] = Create3DTextLabel(title,RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.4);
        LabelSet[playerid] = true;
    }
    return 1;
}
Reply
#2

What exactly do you want ?
Reply
#3

Quote:
Originally Posted by The__
Посмотреть сообщение
What exactly do you want ?
When NPC spawn's, it dont get a label on top of his head
Reply
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)){
    new title[64];
    switch(GetPlayerScore(playerid)) {
        case 0..50:     format(title,sizeof(title),"Newbie Trucker");
        case 51..100:   format(title,sizeof(title),"Trucker in training");// Trucker in training
        case 101..200:  format(title,sizeof(title),"GoodTrucker"); // GoodTrucker
        case 201..500:  format(title,sizeof(title),"Junior Trucker"); // Junior Trucker
        case 501..1000: format(title,sizeof(title),"Senior Trucker");// Senior Trucker
        case 1001..1500:format(title,sizeof(title),"Trucker"); // Trucker
        case 1501..2000:format(title,sizeof(title),"Teansport Trucker"); // Transport Trucker
        case 2001..2500:format(title,sizeof(title),"Licensed Trucker"); // Licensed Trucker
        case 2501..3000:format(title,sizeof(title),"European Trucker"); // European Trucker
        case 3001..3500:format(title,sizeof(title),"World Trucker"); // "World Trucker"
        default:format(title,sizeof(title),"World European Trucker"); // World European Trucker
    }
    if(!LabelSet[playerid]) {
        label[playerid] = Create3DTextLabel(title,RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.4);
        LabelSet[playerid] = true;
    } else {
        Delete3DTextLabel(label[playerid]);
        label[playerid] = Create3DTextLabel(title,RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.4);
        LabelSet[playerid] = true;
    }
}
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)