06.11.2010, 00:30
(
Последний раз редактировалось lucas_mdr1235; 06.11.2010 в 00:50.
)
GM: VLC Creditos :Caio_Cartaxo
so tentei modificar p /equipar queria colocar para serta arma e quantidade de balas nas armas para cada cargo ai
chego a esse ponto!
so iniciante!!
desde ja agradeзo a ajuda de vcs!!!
@EDIT
consegui mas se alguem conseguir da uma melhorada
so tentei modificar p /equipar queria colocar para serta arma e quantidade de balas nas armas para cada cargo ai
chego a esse ponto!
pawn Код:
if(strcmp(cmd, "/equipar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(20.0, playerid,254.7391,65.5514,1003.6406) || PlayerToPoint(20.0,playerid,246.3652,123.7967,1003.2188) || PlayerToPoint(20.0,playerid,223.9656,1872.4908,13.7344) || PlayerToPoint(20.0,playerid,299.7097,183.1322,1007.1719) || PlayerToPoint(20.0,playerid,628.6713,-571.8173,17.1068) || PlayerToPoint(20.0,playerid,-1615.7856,683.6613,7.1875)
|| PlayerToPoint(20.0,playerid,-1346.4631,492.4095,11.2027) || PlayerToPoint(20.0,playerid,1304.8406,-1062.3234,29.2390) || PlayerToPoint(20.0,playerid,2282.1035,-2030.4628,13.5469))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if (PlayerInfo[playerid][pCargo] == 1)
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
}
if (PlayerInfo[playerid][pCargo] == 2)
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
if (PlayerInfo[playerid][pCargo] == 3)
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
if (PlayerInfo[playerid][pCargo] == 4)
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
if (PlayerInfo[playerid][pCargo] == 5)
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
if (PlayerInfo[playerid][pCargo] == 6)
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб autorizado a esse comando!");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб na em um ponto de equipamento!");
}
}
desde ja agradeзo a ajuda de vcs!!!
@EDIT
consegui mas se alguem conseguir da uma melhorada
pawn Код:
if(strcmp(cmd, "/equipar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(20.0, playerid,254.7391,65.5514,1003.6406) || PlayerToPoint(20.0,playerid,246.3652,123.7967,1003.2188) || PlayerToPoint(20.0,playerid,223.9656,1872.4908,13.7344) || PlayerToPoint(20.0,playerid,299.7097,183.1322,1007.1719) || PlayerToPoint(20.0,playerid,628.6713,-571.8173,17.1068) || PlayerToPoint(20.0,playerid,-1615.7856,683.6613,7.1875)
|| PlayerToPoint(20.0,playerid,-1346.4631,492.4095,11.2027) || PlayerToPoint(20.0,playerid,1304.8406,-1062.3234,29.2390) || PlayerToPoint(20.0,playerid,2282.1035,-2030.4628,13.5469))
{
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pMembro] == 25 || PlayerInfo[playerid][pMembro] == 28 || PlayerInfo[playerid][pMembro] == 29
|| PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pLider] == 2 || PlayerInfo[playerid][pLider] == 3 || PlayerInfo[playerid][pLider] == 17 || PlayerInfo[playerid][pLider] == 25 || PlayerInfo[playerid][pLider] == 28 || PlayerInfo[playerid][pLider] == 29)
{
if (PlayerInfo[playerid][pCargo] == 1)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
}
}
if (PlayerInfo[playerid][pCargo] == 2)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
if (PlayerInfo[playerid][pCargo] == 3)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
if (PlayerInfo[playerid][pCargo] == 4)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
if (PlayerInfo[playerid][pCargo] == 5)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
if (PlayerInfo[playerid][pCargo] == 6)
{
format(string, sizeof(string), "* %s Pegou seus equipamentos.", sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(playerid);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GivePlayerWeapon(playerid, 24, 200);
GivePlayerWeapon(playerid, 6, 1);
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou seu equipamentos!");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб autorizado a esse comando!");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб na em um ponto de equipamento!");
}
}