24.10.2011, 05:46
Galera, sou novato nessa бrea de Pawn, e nunca precisei vir pedir a ajuda de vcs, mas to com um problema aki que nao to conseguindo resolver, sei q deve ter algo errado, por isso vim pedir ajuda pela primeira vez depois de mais de um ano de cadastro no forum... ^^
Sequinte, da forma que estб eu entro de lider da org e consigo me equipar de boa, e me promovo para cargo 1 e pego os equipamentos certos, assim com qualquer cargo (de 1 a 6), sу que quando convido outro player (/convidar) ele vem de cargo 1 e pega os equipamentos certos, mas apos /promover pra cargo 2-6 ele continua equipando como cargo 1.
Resumindo: Player convidado sу equipa como cargo 1 mesmo depois de /promover de (2 a 6).
Desde jб agradeзo a atenзгo.
Sequinte, da forma que estб eu entro de lider da org e consigo me equipar de boa, e me promovo para cargo 1 e pego os equipamentos certos, assim com qualquer cargo (de 1 a 6), sу que quando convido outro player (/convidar) ele vem de cargo 1 e pega os equipamentos certos, mas apos /promover pra cargo 2-6 ele continua equipando como cargo 1.
Resumindo: Player convidado sу equipa como cargo 1 mesmo depois de /promover de (2 a 6).
Desde jб agradeзo a atenзгo.
pawn Код:
if(strcmp(cmd, "/equipar", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_GREY," Vocк nгo pode equipar na cadeia!");
return 1;
}
if (IsACop(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
if(IsAEnforcerCar(tmpcar)||PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnFitted[playerid] == 1)
{
ResetPlayerWeapons(playerid);
OnFitted[playerid] = 0;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pRank] == 1)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de cargo 1.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 31, 400);
GivePlayerWeapon(playerid, 29, 400);
GivePlayerWeapon(playerid, 41, 400);
GivePlayerWeapon(playerid, 17, 10);
SetPlayerArmour(playerid,99);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pRank] == 2)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de cargo 2.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 120);
GivePlayerWeapon(playerid, 24, 120);
GivePlayerWeapon(playerid, 3, 0);
GivePlayerWeapon(playerid, 29, 450);
GivePlayerWeapon(playerid, 31, 450);
GivePlayerWeapon(playerid, 41, 450);
GivePlayerWeapon(playerid, 17, 20);
SetPlayerArmour(playerid,99);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pRank] == 3)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de cargo 3.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 150);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 29, 500);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 41, 500);
GivePlayerWeapon(playerid, 17, 30);
GivePlayerWeapon(playerid, 4, 0);
SetPlayerArmour(playerid,99);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pRank] == 4)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de cargo 4.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 170);
GivePlayerWeapon(playerid, 24, 170);
GivePlayerWeapon(playerid, 29, 550);
GivePlayerWeapon(playerid, 31, 550);
GivePlayerWeapon(playerid, 41, 550);
GivePlayerWeapon(playerid, 4, 0);
GivePlayerWeapon(playerid, 34, 7);
GivePlayerWeapon(playerid, 16, 1);
SetPlayerArmour(playerid,99);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pRank] == 5)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de cargo 5.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 190);
GivePlayerWeapon(playerid, 24, 190);
GivePlayerWeapon(playerid, 29, 600);
GivePlayerWeapon(playerid, 31, 600);
GivePlayerWeapon(playerid, 41, 600);
GivePlayerWeapon(playerid, 34, 10);
GivePlayerWeapon(playerid, 16, 2);
GivePlayerWeapon(playerid, 4, 0);
SetPlayerArmour(playerid,99);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pRank] == 6)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de cargo 6.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 210);
GivePlayerWeapon(playerid, 24, 210);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 800);
GivePlayerWeapon(playerid, 41, 800);
GivePlayerWeapon(playerid, 34, 15);
GivePlayerWeapon(playerid, 4, 0);
GivePlayerWeapon(playerid, 16, 3);
SetPlayerArmour(playerid,99);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "PMSF: %s pega seus equipamentos de Lнder.",sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 25, 210);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 31, 800);
GivePlayerWeapon(playerid, 41, 800);
GivePlayerWeapon(playerid, 34, 20);
GivePlayerWeapon(playerid, 4, 0);
GivePlayerWeapon(playerid, 16, 5);
SetPlayerArmour(playerid,100);
SetPlayerHealth(playerid,100);
OnFitted[playerid] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo estб no lugar de equipar de sua HQ.");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Vocк nгo й um Oficial.");
return 1;
}
}