[duv] COmo criar um chat "vip" pra godfather?
#1

tipo assim eu queria criar um chat que so os membros "VIP" ou com donate rank pudessem ver me ajudem eu uso o godfather original
Reply
#2

Procura o comandos do chat de admin, troa [pAdmin] pra [pDonatRank]
Reply
#3

Owned sergio eu posso lhe ajudar
Adcione isso:
//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vipchat", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pVIP] >= 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /vipchat [Chat Vip]");
return 1;
}

Espero ter ajudado
Reply
#4

Troca depois o [pVIP] por [pDonateRank]. E no new result[64] troca para new result[128], assim podes usar mais caracteres numa vez.
Reply
#5

Muito obrigada, os dois me ajudaram muito. um me deu o comando e o outro ajudou a completar ele valeu
Reply
#6

mas de um problema quando eu fui copilar:

C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1853) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1857) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1869) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1873) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1877) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1881) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1885) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1889) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1893) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1905) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1909) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1913) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1917) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1921) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1933) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1937) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1941) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1953) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(1957) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(2807) : warning 202: number of arguments does not match definition
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(3881) : error 004: function "CrimInRange" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(410 : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(4715) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(4792) : error 004: function "ProxDetector" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(4994) : warning 217: loose indentation
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(5024) : error 004: function "ClearChatbox" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(503 : error 004: function "ClearChatbox" is not implemented
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(5110) : warning 217: loose indentation
C:\DOCUME~1\ADMINI~1\Desktop\pawno\gf.pwn(5496) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

me ajuda ai por favor
Reply
#7

/\ Vocк Colocou em que Local do GM?
Reply
#8

Chatvip feito por mim para o atual server ThugLife
[Inicio do GM]

forward SendVIPMessage(color, string[]);

[Onplayercommandtext]

if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/chatvip", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pDonateRank] >= 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /cvip [Chat Vip]");
return 1;
}
format(string, sizeof(string), "** VIP %s: %s", sendername, result);
SendVIPMessage(0xFFCCFFAA,string);
printf("VIP %s: %s", sendername, result);
}
return 1;
}


[Nos publics]

public SendVIPMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pDonateRank] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
Reply
#9

vlv
Reply
#10

vlw aprendi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)