Jump to content

[Cerere]Tuturial TAG La Grad


CylourLP

Recommended Posts

Descriere tutorial:Salutare Tuturor ! Scuzati daca am postat unde nu trebuie ! Vreau sa stiu cum pot face tag la level. de exemplu la Level 1 sa scrie pe Chat CylourLP[Admin]:Salutare tuturor ! sau lvl 10 CylourLP[Fondator]:Salutare Tuturor ! Daca intelegeti ce spun folosesc Romania Stunt Paradise [Dini] ! Multumesc tuturor!​

IVPTbJY.gif

Romania Next Stunt

Link to comment
Share on other sites

Te folosesti de functia "public OnPlayerText" , acolo ar trebui sa fie proxy-ul cu mesajul , loc in care tu vei creea mesajele dupa level .

 

Arata-mi functia de citire a levelului te rog , ca sa-ti fac un exemplu .

Edited by NoNamed
  • Upvote 1
Link to comment
Share on other sites

Nu prea sunt eu bun scripting daca vrei imi poti face tu un tuturial  cam ce ar trebui adaugat si unde ar trebuie

Poi asta vreau sa si fac, dar daca nu am functia prin care citesti level-ul de unde sa stiu ? Imi trebuie functia prin care citesti datele unui player ... :D

Daca nu stii unde o gasesti, iti pot face tutorialul ca la un Godfather (desi nu cred ca se potriveste intocmai cu un stunt) si optimizezi tu pentru gamemode-ul tau .

  • Upvote 1
Link to comment
Share on other sites

Nu prea stiu dar folosesc Luxadmin de pe Romania Mega Stunt zis si Stunt Gaming Moldova daca te ajuta cu cv

​Urca sursa (.pwn) de la gamemode pe zippyshare.com si da-mi pm cu link-ul sa ma uit in el si-ti fac tutorialul .

Link to comment
Share on other sites

Asa, in primul rand, te duci la

public OnPlayerText(playerid, text[])

Apoi introduci o bucla:

if(AccInfo[playerid][Level] == 1)
{
    new string[256];
    format(string, sizeof(string), "%s{FF0000}(Admin){00FF00}(ID:%d): {FFFFFF}%s", PlayerName2(playerid), playerid, text);
    SendClientMessageToAll(~1, string);
    return 0;
}
//PlayerName = Numele Jucatorului
//playerid = ID-ul jucatorului
//text = text-ul scris de jucator

//AccInfo[playerid][Level] == 1 -> Doar Administratorul de Nivel 1 va avea tag (Admin) dupa nume.

Daca doresti sa faci tag-ul (Admin) valabil pentru mai multe nivele de admin, de ex: 1-9 faci astfel:

if(AccInfo[playerid][Level] > 0 && AccInfo[playerid][Level < 10)
{
    new string[256];
    format(string, sizeof(string), "%s{FF0000}(Admin){00FF00}(ID:%d): {FFFFFF}%s", PlayerName2(playerid), playerid, text);
    SendClientMessageToAll(~1, string);
    return 0;
}

Iar daca doresti sa introduci tag-ul la Admin level 10 (Founder) faci astfel:

if(AccInfo[playerid][Level] == 10)
{
    new string[256];
    format(string, sizeof(string), "%s{FF9900}(Founder){00FF00}(ID:%d): {FFFFFF}%s", PlayerName2(playerid), playerid, text);
    SendClientMessageToAll(~1, string);
    return 0;
}

 

Ai grija sa introduci buclele la publicul OnPlayerText.

242086.png

Link to comment
Share on other sites

Totul merge perfect ai +1 de la mine dar imi da 

C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1159) : warning 225: unreachable code
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1161) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1166) : warning 217: loose indentation
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1168) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1175) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1182) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


6 Warnings.

 

IVPTbJY.gif

Romania Next Stunt

Link to comment
Share on other sites

Nu-i merge pentru ca el are LuxAdmin ca filterscript iar liniile alea ii trebuiesc in gamemode pentru ca nu-i citeste proxy-ul din luxadmin , am incercat eu sa-i fac si trebuie integrat luxadmin-ul in gamemode in astfel de cazuri, din cate stiu ...

Link to comment
Share on other sites

Faci la fel si cu VIP-ul, tot la OnPlayerText.

if(AccInfo[playerid][pVip] == 1)
{
    new string[257];
    format(string, sizeof(string), "%s{FF0000}(VIP){00FF00}(ID:%d): {FFFFFF}%s", PlayerName(playerid), playerid, text);
    SendClientMessageToAll(~1, string);
    return 0;
}

 

Edited by KnowN
  • Upvote 1

242086.png

Link to comment
Share on other sites

Frate inca ceva ,, cum fac sa imi apara culoarea numelui care o am pe serve nu alb ?

​Pentru aia iti trebuie o funtie, GetPlayerColor(playerid), care o pui in locul culorii alb (~1).

SendClientMessageToAll(GetPlayerColor(playerid), string);

 

  • Upvote 1

242086.png

Link to comment
Share on other sites

C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(636) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(842) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1205) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1212) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(1219) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\Vlad_Reparatii#98\Desktop\Romania Next Stunt v3\filterscripts\LuxAdmin.pwn(11433) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

IVPTbJY.gif

Romania Next Stunt

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.