SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 10/04/2017, 08:38 PM   #1
iName
Big Clucker
 
iName's Avatar
 
Join Date: Jan 2016
Location: Brazil
Posts: 170
Reputation: 1
Default Cores na palavra e sistema pm

galera

alguem sabe um sistema de pm desse jeito que use tipo cmd : pm ? igual na imagem abaixo

e eu queria tmb, tipo, a pessoa escreve {00FF00} texto ai a palavra sai colorida igual na foto abaixo:

http://i.imgur.com/nAYOYS9.png
iName is offline   Reply With Quote
Old 10/04/2017, 08:51 PM   #2
D3sconn3ct
Huge Clucker
 
D3sconn3ct's Avatar
 
Join Date: Jul 2014
Location: Brasil, AL
Posts: 360
Reputation: 55
Angry Re: Cores na palavra e sistema pm

Mano tem vários tutoriais no fórum, cria um e muito fácil, puta que pariu
__________________
SEXY
D3sconn3ct is offline   Reply With Quote
Old 10/04/2017, 08:53 PM   #3
iName
Big Clucker
 
iName's Avatar
 
Join Date: Jan 2016
Location: Brazil
Posts: 170
Reputation: 1
Default Re: Cores na palavra e sistema pm

Quote:
Originally Posted by D3sconn3ct View Post
Mano tem vários tutoriais no fórum, cria um e muito fácil, puta que pariu
se eu soube - se criar '-' e ja procurei, mas n achei :c
iName is offline   Reply With Quote
Old 10/04/2017, 08:55 PM   #4
didimk157
Huge Clucker
 
Join Date: Oct 2016
Location: Seropedica/RJ
Posts: 451
Reputation: 8
Default Re: Cores na palavra e sistema pm

tente ai
PHP Code:
public OnPlayerCommandText(playeridcmdtext[])
{
new 
cmd[256];
    new    
tmp[256];
    new 
Message[256];
    new 
gMessage[256];
    new 
pName[MAX_PLAYER_NAME+1];
    new 
iName[MAX_PLAYER_NAME+1];
    new    
idx;

    
cmd strtok(cmdtextidx);

    
// PM Command
    
if(strcmp("/pm"cmdtrue) == 0)
    {
        
tmp strtok(cmdtext,idx);

        if(!
strlen(tmp) || strlen(tmp) > 5) {
            
SendClientMessage(playerid,-1,"[INFO]: /pm (id) (mensagem)");
            return 
1;
        }

        new 
id strval(tmp);
        
gMessage strrest(cmdtext,idx);

        if(!
strlen(gMessage)) {
            
SendClientMessage(playerid,-1,"[INFO]: /pm (id) (mensagem)");
            return 
1;
        }

        if(!
IsPlayerConnected(id)) {
            
SendClientMessage(playerid,-1,"[INFO] Player não conectado!");
            return 
1;
        }

        if(
playerid != id) {
            
GetPlayerName(id,iName,sizeof(iName));
            
GetPlayerName(playerid,pName,sizeof(pName));
            
format(Message,sizeof(Message),"{FFFF00}>> %s(%d):{FFCC00} %s",iName,id,gMessage);
            
SendClientMessage(playerid,-1,Message);
            
format(Message,sizeof(Message),"{FFFF00}** %s(%d):{FFCC00} %s",pName,playerid,gMessage);
            
SendClientMessage(id,-1,Message);
            
PlayerPlaySound(id,1085,0.0,0.0,0.0);

            
printf("PM: %s",Message);

        }
        else {
            
SendClientMessage(playerid,-1,"Você não pode mandar PM para você mesmo");
        }
        return 
1;
    } 
__________________
didimk157 is offline   Reply With Quote
Old 10/04/2017, 08:56 PM   #5
iName
Big Clucker
 
iName's Avatar
 
Join Date: Jan 2016
Location: Brazil
Posts: 170
Reputation: 1
Default Re: Cores na palavra e sistema pm

Quote:
Originally Posted by didimk157 View Post
tente ai
PHP Code:
public OnPlayerCommandText(playeridcmdtext[])
{
new 
cmd[256];
    new    
tmp[256];
    new 
Message[256];
    new 
gMessage[256];
    new 
pName[MAX_PLAYER_NAME+1];
    new 
iName[MAX_PLAYER_NAME+1];
    new    
idx;

    
cmd strtok(cmdtextidx);

    
// PM Command
    
if(strcmp("/pm"cmdtrue) == 0)
    {
        
tmp strtok(cmdtext,idx);

        if(!
strlen(tmp) || strlen(tmp) > 5) {
            
SendClientMessage(playerid,-1,"[INFO]: /pm (id) (mensagem)");
            return 
1;
        }

        new 
id strval(tmp);
        
gMessage strrest(cmdtext,idx);

        if(!
strlen(gMessage)) {
            
SendClientMessage(playerid,-1,"[INFO]: /pm (id) (mensagem)");
            return 
1;
        }

        if(!
IsPlayerConnected(id)) {
            
SendClientMessage(playerid,-1,"[INFO] Player não conectado!");
            return 
1;
        }

        if(
playerid != id) {
            
GetPlayerName(id,iName,sizeof(iName));
            
GetPlayerName(playerid,pName,sizeof(pName));
            
format(Message,sizeof(Message),"{FFFF00}>> %s(%d):{FFCC00} %s",iName,id,gMessage);
            
SendClientMessage(playerid,-1,Message);
            
format(Message,sizeof(Message),"{FFFF00}** %s(%d):{FFCC00} %s",pName,playerid,gMessage);
            
SendClientMessage(id,-1,Message);
            
PlayerPlaySound(id,1085,0.0,0.0,0.0);

            
printf("PM: %s",Message);

        }
        else {
            
SendClientMessage(playerid,-1,"Você não pode mandar PM para você mesmo");
        }
        return 
1;
    } 
PHP Code:

C
:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(905) : warning 217loose indentation
C
:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(9207) : warning 204symbol is assigned a value that is never used"TString"
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16262) : warning 217loose indentation
C
:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16271) : warning 217loose indentation
C
:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16278) : error 017undefined symbol "strtok"
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16278) : error 033: array must be indexed (variable "cmd")
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16283) : error 017undefined symbol "strtok"
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16283) : error 033: array must be indexed (variable "tmp")
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16291) : error 017undefined symbol "strrest"
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16291) : error 033: array must be indexed (variable "gMessage")
C:\Users\sonny\Downloads\ESS\server\gamemodes\ESS.pwn(16326) : error 030compound statement not closed at the end of file (started at line 16270)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


7 Errors

iName is offline   Reply With Quote
Old 10/04/2017, 08:58 PM   #6
didimk157
Huge Clucker
 
Join Date: Oct 2016
Location: Seropedica/RJ
Posts: 451
Reputation: 8
Default Re: Cores na palavra e sistema pm

tem que adaptar né n só copiar e colar tem q colocar as coisas q sao da sua GM ué '-'
__________________
didimk157 is offline   Reply With Quote
Old 10/04/2017, 09:00 PM   #7
IlanZ
High-roller
 
Join Date: Jul 2016
Location: Brasil
Posts: 1,348
Reputation: 75
Default vai estudar vagabundu

PHP Code:
CMD:pm(playeridparams[])
{
    new 
str[128], idgaynomegay[MAX_PLAYER_NAME], textogay[128];
    
GetPlayerName(playeridnomegayMAX_PLAYER_NAME);
    if(
sscanf(params), "ds[128]"idgaytextogay) return SendClientMessage(playerid, -1"Use: /pm [id] [Msg]");
    
format(strsizeof(str), "[PM] %s[ID:%d]: %s"nomegayidgaytextogay);
    return 
SendClientMessage(idgay, -1textogay);

IlanZ is offline   Reply With Quote
Old 10/04/2017, 09:03 PM   #8
iName
Big Clucker
 
iName's Avatar
 
Join Date: Jan 2016
Location: Brazil
Posts: 170
Reputation: 1
Default Re: vai estudar vagabundu

Quote:
Originally Posted by IlanZ View Post
PHP Code:
CMD:pm(playeridparams[])
{
    new 
str[128], idgaynomegay[MAX_PLAYER_NAME], textogay[128];
    
GetPlayerName(playeridnomegayMAX_PLAYER_NAME);
    if(
sscanf(params), "ds[128]"idgaytextogay) return SendClientMessage(playerid, -1"Use: /pm [id] [Msg]");
    
format(strsizeof(str), "[PM] %s[ID:%d]: %s"nomegayidgaytextogay);
    return 
SendClientMessage(idgay, -1textogay);

'-' pra que por "gay" nisso kkkk
iName is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Sistema de proibição de Nick/Parte de Nick/TAG/Caractere/Palavra [SQLite] F1N4L Lançamentos/Releases 10 08/10/2016 09:51 PM
[Ajuda] Palavra em Variavel matheusdorado Português/Portuguese 4 01/10/2016 04:12 PM
[FilterScript] Sistema De Cores Nice-.- Lançamentos/Releases 12 10/10/2012 08:34 PM
[FilterScript] Sistema de Cores Simples v1.0 Jonas_Alves Lançamentos/Releases 5 14/08/2012 12:42 AM


All times are GMT. The time now is 02:52 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.