[Ajuda] me ajuda num sistema de roubo - 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] me ajuda num sistema de roubo (
/showthread.php?tid=502683)
me ajuda num sistema de roubo -
zDbruno - 25.03.2014
quando o cara vai robar eu queria po um sistema que ve se ele ta sozinho, se ele tiver sozinho ele nao pode roubar se ele tiver mais que 2 ele ja pode roubar me ajuda e so esse sistema q detecta se ele ta sozinho ta ai o /roubar
PHP код:
if(strcmp(cmd,"/roubar",true )==0)
{
new org = GetPlayerOrg(playerid);
if(org == 1 || org == 2 || org == 3 || org == 4|| org == 7 || org == 8 || org == 9 || org == 10 || org == 11 || org == 16 || org == 26 || org == 29)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar um estй Local");
return 1;
}
if(PlayerInfo[playerid][pDinami] < 0)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem Dinamite vб atй o local marcado no Mapa para Comprar!");
SetPlayerCheckpoint(playerid, -1061.2972,-1195.4879,129.7757, 8.0);
return 1;
}
if(roubando[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
return 1;
}
if(PlayerToPoint(1.0,playerid, 2306.5127,-6.1166,26.7422))
{
if(roubobanco == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo nesse cofre.");
return 1;
}
if(temporoubobanco == 1)
{
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do banco espere 3 minutos para roubar de novo !");
return 1;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
SendClientMessageToAll(COLOR_GRAD2, "{ADFF2F}( • • • • • • • • • • • • • • • • • •[ {69C7E4}Assalto ao Banco{ADFF2F} ]• • • • • • • • • • • • • • • • • • )");
SendClientMessageToAll(COR_CV, "Os Assaltantes estгo tentando roubar o banco central de Los Santos,Todas unidades a Caminho.");
SendClientMessage(playerid, COLOR_GRAD5, "Espere 40 segundos para terminar de roubar o banco.");
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
roubando[playerid] = 1;
ProvocoBanco[playerid] = 1;
roubobanco = 1;
temporoubobanco = 1;
SetTimer("Aroubo", 180000, 0);
tempobanco = SetTimerEx("RouboBanco", 40000, 0, "i", playerid);
PlayerInfo[playerid][pDinami] -= 1;
return 1;
}
me ajuda por favor
Re: me ajuda num sistema de roubo -
zDbruno - 25.07.2014
alguem sabe ?
Re: me ajuda num sistema de roubo -
UPsamp - 25.07.2014
PHP код:
new b, Float:cVar[3];
GetPlayerPos(playerid, cVar[0], cVar[1], cVar[2]);
for(new i; i < GetMaxPlayers(); i++) {
if(IsPlayerInRangeOfPoint(i, 10.0, cVar[0], cVar[1], cVar[2]))
b++;
}
if(b < 2)// se estiver 2 players n local ja pode roubar
return SendClientMessage(playerid, -1, "precisa de no minimo 2 jogadores pra rouba");
nao ta identado, fiz aqui rapidao no bloco de notas pq to no trampo xD