22.04.2012, 23:14
Seguinte galera como faзo para checar, se o player digitar /roubar e estiver sozinho sem mais nenhum membro da sua gang aparece voce so pode roubar o banco em 3+, alguem me ajuda?
GangMembersInPoint(playerid, Float:VBRaio, Float:VBX, Float:VBY, Float:VBZ)
{
new Cont;
for(new i, j = GetMaxPlayers(); i != j; i++)
if(IsPlayerConnected(i))
if(IsPlayerInRangeOfPoint(i, VBRaio, VBX, VBY, VBZ))
if(Gang[playerid] == Gang[i]) // Adapte
Count++;
return Count;// Nъmero de pessoas da mesma gang no mesmo local
}
if(GangMembersInPoint(playerid, Raio, X, Y, Z) < 3)
return SendClientMessage(playerid,-1,"Trкs membros da gang sгo necessбrios.");
pawn Код:
pawn Код:
|
GangMembersInPoint(playerid, Float:VBRaio, Float:VBX, Float:VBY, Float:VBZ)
{
new Count; //Vocк declarou como 'Cont' e usou 'Count' abaixo :)
for(new i, j = GetMaxPlayers(); i != j; i++)
if(IsPlayerConnected(i))
if(IsPlayerInRangeOfPoint(i, VBRaio, VBX, VBY, VBZ))
if(Gang[playerid] == Gang[i]) // Adapte
Count++;
return Count;// Nъmero de pessoas da mesma gang no mesmo local
}
Pequena correзгo
pawn Код:
|
GangMembersInPoint(playerid, Float:VBRaio, Float:VBX, Float:VBY, Float:VBZ)
{
new Count; //Vocк declarou como 'Cont' e usou 'Count' abaixo :)
for(new i, j = GetMaxPlayers(); i != j; i++) if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, VBRaio, VBX, VBY, VBZ) && Gang[playerid] == Gang[i])
Count++;
return Count;// Nъmero de pessoas da mesma gang no mesmo local
}
if(GangMembersInPoint(playerid, Raio, X, Y, Z) < 3)
return SendClientMessage(playerid,-1,"Trкs membros da gang sгo necessбrios.");
if(GangMembersInPoint(playerid, 10, 100.0, -200.0, 13.0) < 3)