if(strcmp(cmd,"/roubar",true)==0)
{
if(PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
&& PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
&& PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
&& PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
&& PlayerInfo[playerid][pMembro] != 19 && PlayerInfo[playerid][pLider] != 19
&& PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20
&& PlayerInfo[playerid][pMembro] != 21 && PlayerInfo[playerid][pLider] != 21
&& GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 12
&& GetPlayerOrg(playerid) != 13 && GetPlayerOrg(playerid) != 15)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar um Banco/Loterica/Loja de Armas 1, 2");
return 1;
}
if(roubando[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
return 1;
}
if(PlayerToPoint(1.0,playerid, 2141.221923,1642.316802,992.978110))
{
if(roubobanco == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo neste cofre.");
return 1;
}
if(temporoubobanco == 1)
{
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do Banco espere 20 minutos para roubar de novo !");
return 1;
}
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s e os %s estгo tentando roubar o cofre banco! ID:[%d]", playername, NomeORG(playerid) , playerid);
SendClientMessageToAll(GetPlayerColor(playerid), string);
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar o banco.");
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
SetPlayerAttachedObject(playerid, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
CreateExplosion(2141.221923,1642.316802,992.978110, 12, 10.0);
tempo(playerid);
roubando[playerid] = 1;
ProvocoBanco[playerid] = 1;
roubobanco = 1;
temporoubobanco = 1;
SetTimer("Aroubo", 220000, 0);
tempobanco = SetTimerEx("RouboBanco", 60000, 0, "i", playerid);
return 1;
}
if(strcmp(cmd,"/roubar",true)==0)
{
if(GetPlayerWeapon(playerid) != 39)
return SendClientMessage(playerid, -1, "Tem que tar com a dinamite na mгo..");
//resto.
if(strcmp(cmd,"/roubar",true)==0)
{
if(PlayerInfo[playerid][pMembro] != 5 && PlayerInfo[playerid][pLider] != 5
&& PlayerInfo[playerid][pMembro] != 14 && PlayerInfo[playerid][pLider] != 14
&& PlayerInfo[playerid][pMembro] != 17 && PlayerInfo[playerid][pLider] != 17
&& PlayerInfo[playerid][pMembro] != 18 && PlayerInfo[playerid][pLider] != 18
&& PlayerInfo[playerid][pMembro] != 19 && PlayerInfo[playerid][pLider] != 19
&& PlayerInfo[playerid][pMembro] != 20 && PlayerInfo[playerid][pLider] != 20
&& PlayerInfo[playerid][pMembro] != 21 && PlayerInfo[playerid][pLider] != 21
&& GetPlayerOrg(playerid) != 6 && GetPlayerOrg(playerid) != 12
&& GetPlayerOrg(playerid) != 13 && GetPlayerOrg(playerid) != 15)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode assaltar um Banco/Loterica/Loja de Armas 1, 2");
return 1;
}
if(roubando[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб roubando algum lugar.");
return 1;
}
if(PlayerToPoint(1.0,playerid, 2141.221923,1642.316802,992.978110))
{
if(roubobanco == 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma tentativa de roubo neste cofre.");
return 1;
}
if(temporoubobanco == 1)
{
SendClientMessage(playerid,COLOR_GREY,"Jб roubaram o cofre do Banco espere 20 minutos para roubar de novo !");
return 1;
}
if(GetPlayerWeapon(killerid) != 39) return SendClientMessage(playerid,COLOR_GREY,"Vocк nгo tem a buceta da Dimite para Explodir sa porra -q");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s e os %s estгo tentando roubar o cofre banco! ID:[%d]", playername, NomeORG(playerid) , playerid);
SendClientMessageToAll(GetPlayerColor(playerid), string);
SendClientMessage(playerid, COLOR_GRAD5, "Espere 60 segundos para terminar de roubar o banco.");
SetPlayerCriminal(playerid,255, "Tentativa de Roubo ao Banco");
ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 1, 0);
SetPlayerAttachedObject(playerid, 3, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
CreateExplosion(2141.221923,1642.316802,992.978110, 12, 10.0);
tempo(playerid);
roubando[playerid] = 1;
ProvocoBanco[playerid] = 1;
roubobanco = 1;
temporoubobanco = 1;
SetTimer("Aroubo", 220000, 0);
tempobanco = SetTimerEx("RouboBanco", 60000, 0, "i", playerid);
return 1;
}
awe vlw deu certo, sу q tem como, quando ele tiver com a dina, e digitar /roubar, a dinamite some, esу se ele tivier 2 ai ele fica com 1?
|
new ammo = GetPlayerAmmo(playerid);
RemovePlayerWeapon(playerid, 39);
GivePlayerWeapon(playerid, 39, ammo-1);
stock RemovePlayerWeapon(playerid, weaponid)
{
if(!IsPlayerConnected(playerid) || weaponid < 0 || weaponid > 50)
return;
new
saveweapon[13],
saveammo[13];
for(new slot = 0; slot < 13; slot++)
GetPlayerWeaponData(playerid, slot, saveweapon[slot], saveammo[slot]);
ResetPlayerWeapons(playerid);
for(new slot; slot < 13; slot++)
{
if(saveweapon[slot] == weaponid || saveammo[slot] == 0)
continue;
GivePlayerWeapon(playerid, saveweapon[slot], saveammo[slot]);
}
GivePlayerWeapon(playerid, 0, 1);
}
deu esse erro aki:
D:\Samp\gamemodes\BPB.pwn(48835) : error 021: symbol already defined: "RemovePlayerWeapon" |