Este e de Vip : if(PlayerInfo[i][pVIP] == 1)
Este e de Vip Premium : if(PlayerInfo[i][pVIP] == 2)
if(strcmp(cmd, "/compraremp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pPbiskey] != 255)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк ja tem uma empresa, Digite /venderemp para comprar outra.");
return true;
}
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
SBizzInfo[b][sbLocked] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-SBizzInfo[b][sbBuyPrice]);
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou uma empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
Atualizar3Dtexts();
OnPropUpdate();
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem grana suficiente");
return true;
}
}
}
if(strcmp(cmd, "/compraremp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pPbiskey] != 255)return SendClientMessage(playerid, COLOR_GREY, " Vocк ja tem uma empresa, Digite /venderemp para comprar outra.");
if(PlayerInfo[playerid][Vip] == 0)return SendClientMessage(playerid,-1,"Voce Nao e Vip);
if(PlayerInfo[playerid][Vip] >= 1)
{
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
SBizzInfo[b][sbLocked] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-SBizzInfo[b][sbBuyPrice]);
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou uma empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
Atualizar3Dtexts();
OnPropUpdate();
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem grana suficiente");
return true;
}
}
}
}
}
return 1;
}
pawn Код:
|
if(strcmp(cmd, "/compraremp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pPbiskey] != 255)return SendClientMessage(playerid, COLOR_GREY, " Vocк ja tem uma empresa, Digite /venderemp para comprar outra.");
if(PlayerInfo[playerid][Vip] == 0)return SendClientMessage(playerid,-1,"Voce Nao e Vip"); //faltou aqui o "
if(PlayerInfo[playerid][Vip] >= 1)
{
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
SBizzInfo[b][sbLocked] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-SBizzInfo[b][sbBuyPrice]);
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou uma empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
Atualizar3Dtexts();
OnPropUpdate();
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem grana suficiente");
return true;
}
}
}
}
}
return 1;
}
C:\Users\Nauan ~\Desktop\Server 0.3d\gamemodes\BML.pwn(25587) : error 017: undefined symbol "Vip"
C:\Users\Nauan ~\Desktop\Server 0.3d\gamemodes\BML.pwn(25587) : error 037: invalid string (possibly non-terminated string)
C:\Users\Nauan ~\Desktop\Server 0.3d\gamemodes\BML.pwn(25587) : error 017: undefined symbol "Voce"
C:\Users\Nauan ~\Desktop\Server 0.3d\gamemodes\BML.pwn(25587) : fatal error 107: too many error messages on one line]
if(PlayerInfo[playerid][Vip] == 0)return SendClientMessage(playerid,-1,"Voce Nao e Vip);
Ups vocк se enganou, faltou um " no final de uma mensagem...
pawn Код:
|
C:\Users\Nauan ~\Desktop\Server 0.3d\gamemodes\BML.pwn(25587) : error 017: undefined symbol "Vip"
C:\Users\Nauan ~\Desktop\Server 0.3d\gamemodes\BML.pwn(25588) : error 017: undefined symbol "Vip"
if(PlayerInfo[playerid][Vip] == 0)return SendClientMessage(playerid,-1,"Voce Nao e Vip"); //faltou aqui o "
if(PlayerInfo[playerid][Vip] >= 1)
ainda deu erro olha so
os erros foram esses : pawn Код:
pawn Код:
|
enum PlayerInfo { Vip, Admin }
procure no seu GM (CTRL + F) por enum pInfo e depois adicione a variбvel Vip, pois ela estб faltando no GM...
|