[AJUDA] /cvip - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] /cvip (
/showthread.php?tid=277783)
[AJUDA] /cvip -
Lipe_Stronda - 19.08.2011
Bom, achei um chat vip por ai me deu ideia de fazer um sistema de vip, e o chat vip nao estб fufando como deve
se eu digitar somente /cvip vai aparecer
VIP: Lipe_Stronda: /cvip
se eu digitar /cvip [texto]
da Comando invalido
Codes:
PHP код:
forward SendVIPMessage(color, string[]);
public SendVIPMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Vip[i] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
// ====================== [ Chat de Vips ;D ] ==================================
if(strcmp(cmdtext, "/cvip", true) == 0 || strcmp(cmdtext, "/v", true) == 0)
{
if(Vip[playerid] >= 1)
{
new idx;
new string[300];
new sendername[MAX_PLAYER_NAME];
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, -1, "USE: /v [Chat Vip]");
return 1;
}
format(string, sizeof(string), "** VIP %s: %s", sendername, result);
SendVIPMessage(0xFFCCFFAA,string);
printf("VIP %s: %s", sendername, result);
}
return 1;
}
Re: [AJUDA] /cvip - array13 - 19.08.2011
PHP код:
forward SendVIPMessage(color, string[]);
public SendVIPMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Vip[i] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
// ====================== [ Chat de Vips ;D ] ==================================
if(strcmp(cmdtext, "/cvip", true) == 0 || strcmp(cmdtext, "/v", true) == 0)
{
if(Vip[playerid] >= 1)
{
new idx;
new string[300];
new sendername[MAX_PLAYER_NAME];
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, -1, "USE: /v [Chat Vip]");
}
format(string, sizeof(string), "** VIP %s: %s", sendername, result);
SendVIPMessage(0xFFCCFFAA,string);
printf("VIP %s: %s", sendername, result);
}
return 1;
}
Re: [AJUDA] /cvip -
Lipe_Stronda - 19.08.2011
nгo funcionou
Re: [AJUDA] /cvip - array13 - 19.08.2011
voce tem zcmd?eu tenho um comando admin chat em zcmd...so tinha de mudar umas coisas para ficar vip chat
Re: [AJUDA] /cvip -
Lipe_Stronda - 19.08.2011
Nгo uso zmcd dxa pra la dps eu faзo um