01.06.2013, 17:40
tbm concordo ninguem vai te passar um code pronto fiote, oque custa procurar
o resto vc sivira, ja tei uma base quase pronta edit... do seu geito
pawn Код:
if(strcmp(cmd,"/assaltar",true)==0)
{
if (PlayerInfo[playerid][pMembro] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMembro] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLeader] == 18)
if(IsPlayerConnected(playerid))
{
new playa;
playa = ReturnUser(tmp);
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Use: /assaltar [ID do Player]");
return 1;
}
if(giveplayerid != INVALID_PLAYER_ID)
{
if (IsPlayerConnected(giveplayerid))
{
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(PlayerInfo[playa][pMembro] == 1 || PlayerInfo[playa][pMembro] == 2 || PlayerInfo[playa][pMembro] == 3)
{
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = 300;
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
SendClientMessage(playerid,TEAM_GROVE_COLOR,"Vocк foi preso por assaltar um policial!");
return 1;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new dindin = GetPlayerMoney(giveplayerid) / 2;
format(string, sizeof(string), "Vocк roubou %d R$ do %d.", dindin, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s te roubou %d R$, corra e chame a Policia!", sendername, dindin);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s estб assaltando %s!", sendername,giveplayer);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerMoney(playerid, dindin);
GivePlayerMoney(giveplayerid, -dindin);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Esse jogador nгo estб perto de vocк.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nome/ID Invбlido.");
}
}
}
return 1;
}