Jump to content
  • 0

Question

Posted

Salut sunt qUneT si dupa cum scrie in subiect asi vrea sa pun culoarea la numele playerului dupa ce skin are.

Va rog repedee....

3 answers to this question

Recommended Posts

Posted

Dupa ce se logheaza pe server (cel mai bine, in public-ul OnPlayerLogin(params) sau cum il ai tu definit):

switch (GetPlayerSkin(playerid)) { // sau daca ai skin-ul salvat intr-o variabila, pui switch(PlayerVar[playerid][pSkin])
     case 1: { // 1 fiind skin-ul jucatorului
          SetPlayerColor(playerid, 0xFFFFFFAA);
          // ... eventual poti sa mai bagi tu ceva pe-aici, tot in functie de skin
     }
     case 2: {
          // la fel
     }
     ... // tot asa
     default: {
     ... // asta e pentru un caz de baza, adica daca nu se incadreaza in nicio conditie de mai sus
    }
} 

Posted

imi dai un exemplu adica skin 6 44 47 Sa aiba culoarea RED si 280 281 282 BLUE + ca nu am register/login system

EDIT: + ca vreau la skin 6 44 47 sa scrie un textdraw sau ceva de genu TERO pe mijlocul ecranului iar la skin 280 281 282 BLUE

Posted
public OnPlayerSpawn(playerid) {
     switch (GetPlayerSkin(playerid)) {
          case 6, 44, 47:           SetPlayerColor(playerid, 0xFF0000AA);  // pentru astia, rosu
          case 280, 281, 282:       SetPlayerColor(playerid, 0x0000FFAA);  // pentru astia, albastru
          default:                  SetPlayerColor(playerid, 0xFFFFFFAA);   // iar pentru restul, alb
     } 
     return 1;
}

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.