new sendername[MAX_PLAYER_NAME];
forward SendVIPMessage(color, string[]);
public SendVIPMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pVIP] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/v", 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, "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;
}
forward MandarMensagemVIP(color, string[])
public MandarMensagemVIP(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pDonateRank] > 0)
{
SendClientMessage(i,color, string);
}
}
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/vip", true) == 0)
{
if(IsPlayerConnected(playerid))
{
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, 0xBFC0C2FF, "USO: /vp [texto]");
return 1;
}
else if(PlayerInfo[playerid][pDonateRank] > 0)
{
format(string, sizeof(string), "Jogador VIP %s: %s ** ", sendername, result);
SendVIPMessage(0xBA55D3FF, string);
return 1;
}
else return SendClientMessage(playerid, 0xFFFF00AA, " Vocк nгo й VIP !");
}
else return SendClientMessage(playerid, 0xFFFF00AA, " Vocк deve fazer login para usar o radio !");
}
return 1;
}
new sendername[MAX_PLAYER_NAME];
forward SendVIPMessage(color, string[]);
public SendVIPMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pVIP] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/v", true) == 0)
{
if(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, "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;
}
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(4151) : warning 219: local variable "sendername" shadows a variable at a preceding level
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(18744) : warning 219: local variable "sendername" shadows a variable at a preceding level
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(18828) : error 017: undefined symbol "pVIP"
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(43201) : warning 219: local variable "sendername" shadows a variable at a preceding level
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(48333) : error 021: symbol already defined: "SendVIPMessage"
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(48338) : error 017: undefined symbol "pVIP"
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(48345) : warning 203: symbol is never used: "sendername"
Eu acho que fiz tudo certinho mais olha os erros que deu!
pawn Код:
|
D:\Cбssio\Game Modes SA-MP\TrueLife RPG (Na 0.3c)\gamemodes\BTL.pwn(48333) : error 021: symbol already defined: "SendVIPMessage"
pawn Код:
|