[REPS] Mostwanted = Attach3DTextLabelToPlayer , Create3DTextLabel
#1

Hello ,im wondering how to attach to player most wanted if he have 6 stars , i tried also at onplayerupdate its make lag because keep seting the text exceds iv this code;
Код:
   	if(strcmp(cmdtext, "/mostwanted", true) == 0)
    {
    new count = 1, name[24];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        GetPlayerWantedLevel(i);
        if(GetPlayerWantedLevel(i) >= 5)
        {
            GetPlayerName(i, name, sizeof(name));
            format(string, sizeof(string), "%s%s (%d) - Wanted Level: %d\n", string, name,i,GetPlayerWantedLevel(i));
            count ++;
        }
    }
    if(count != 1)
    {
        ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", string, "OK", "");
    }
    else ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", "No online wanted players.", "OK", "");
    return 1;
    }
Reply
#2

pawn Код:
COMMAND:mostwanted(playerid, params[]){
    new countplayer=0,name[25],data[144],result[144];
    for(new player, user = GetMaxPlayers(); player != user; player++){
        //if(IsPlayerConnected(player) && GetPlayerWantedLevel(player) >= 5){
        if(IsPlayerConnected(player) && GetPlayerWantedLevel(player) == 6){
            countplayer++;
            GetPlayerName(player, name, sizeof(name));
            if(countplayer>0){
                format(data, sizeof(data), "%s(%d) - Wanted Level: %d \n",name,player,GetPlayerWantedLevel(player));
                strcat(result,data);
            }else if(countplayer<=0){
                format(data, sizeof(data), "No online wanted players.");
                strcat(result,data);
            }
        }
    }
    ShowPlayerDialog(playerid, 16, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", result, "OK", "");
    return true;
}
Reply
#3

Quote:
Originally Posted by OTACON
Посмотреть сообщение
pawn Код:
COMMAND:mostwanted(playerid, params[]){
    new countplayer=0,name[25],data[144],result[144];
    for(new player, user = GetMaxPlayers(); player != user; player++){
        //if(IsPlayerConnected(player) && GetPlayerWantedLevel(player) >= 5){
        if(IsPlayerConnected(player) && GetPlayerWantedLevel(player) == 6){
            countplayer++;
            GetPlayerName(player, name, sizeof(name));
            if(countplayer>0){
                format(data, sizeof(data), "%s(%d) - Wanted Level: %d \n",name,player,GetPlayerWantedLevel(player));
                strcat(result,data);
            }else if(countplayer<=0){
                format(data, sizeof(data), "No online wanted players.");
                strcat(result,data);
            }
        }
    }
    ShowPlayerDialog(playerid, 16, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", result, "OK", "");
    return true;
}
I need Text3D that the player most wanted :/
Reply
#4

Help
Reply
#5

3D label above the players head?
*Bubble?
Reply
#6

Quote:
Originally Posted by [vTc]Patroool
Посмотреть сообщение
3D label above the players head?
*Bubble?
Yeah
Reply
#7

I suggest you add it once he robs something that made him 6stars,
pawn Код:
//under the robbery that made him 6stars
    new PlayerText3D:MW3d;
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos( playerid, X, Y, Z );
    MW3d = CreatePlayer3DTextLabel(playerid,"Most Wanted",0xFF0000AA,X,Y,Z,40.0);
    Attach3DTextLabelToPlayer(MW3d, playerid, 0.0, 0.0, 0.7);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)