Estгo inclusos em um comando :_.
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[MAX_STRING];
if(pickupid == pickparachute)
{
GivePlayerWeapon(playerid, 46, 1);
return 1;
}
if(pickupid == pickup_GAmonia[playerid])
{
PlayerInfo[playerid][pGam]++;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
DestroyPickup(pickup_GAmonia[playerid]);
SendClientMessage(playerid, COLOR_GRAD4, "Garrafa de Amonia Coletada!");
pickup_GAmonia[playerid] = 0;
pickup_Amonia[playerid] = 0;
pickup_Coca[playerid] = 0;
pickup_Calcio[playerid] = 0;
pickup_Manual[playerid] = 0;
pickup_Oxido[playerid] = 0;
return 1;
}
if(pickupid == pickup_Amonia[playerid])
{
PlayerInfo[playerid][pVam]++;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
DestroyPickup(pickup_Amonia[playerid]);
SendClientMessage(playerid, COLOR_GRAD4, "Amonia Coletada!");
pickup_GAmonia[playerid] = 0;
pickup_Amonia[playerid] = 0;
pickup_Coca[playerid] = 0;
pickup_Calcio[playerid] = 0;
pickup_Manual[playerid] = 0;
pickup_Oxido[playerid] = 0;
return 1;
}
if(pickupid == pickup_Coca[playerid])
{
PlayerInfo[playerid][pPFc]++;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
DestroyPickup(pickup_Coca[playerid]);
SendClientMessage(playerid, COLOR_GRAD4, "Folhas de Coca Coletadas!");
pickup_GAmonia[playerid] = 0;
pickup_Amonia[playerid] = 0;
pickup_Coca[playerid] = 0;
pickup_Calcio[playerid] = 0;
pickup_Manual[playerid] = 0;
pickup_Oxido[playerid] = 0;
return 1;
}
if(pickupid == pickup_Manual[playerid])
{
PlayerInfo[playerid][pMcr]++;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
DestroyPickup(pickup_Manual[playerid]);
SendClientMessage(playerid, COLOR_GRAD4, "Manual Coletado!");
pickup_GAmonia[playerid] = 0;
pickup_Amonia[playerid] = 0;
pickup_Coca[playerid] = 0;
pickup_Calcio[playerid] = 0;
pickup_Manual[playerid] = 0;
pickup_Oxido[playerid] = 0;
return 1;
}
if(pickupid == pickup_Oxido[playerid])
{
PlayerInfo[playerid][pVsc]++;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
DestroyPickup(pickup_Oxido[playerid]);
SendClientMessage(playerid, COLOR_GRAD4, "Soda Caustica Coletada!");
pickup_GAmonia[playerid] = 0;
pickup_Amonia[playerid] = 0;
pickup_Coca[playerid] = 0;
pickup_Calcio[playerid] = 0;
pickup_Manual[playerid] = 0;
pickup_Oxido[playerid] = 0;
return 1;
}
if(pickupid == pickup_Calcio[playerid])
{
PlayerInfo[playerid][pCoc]++;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
DestroyPickup(pickup_Calcio[playerid]);
SendClientMessage(playerid, COLOR_GRAD4, "Capsula de Уxido de Calcio Coletada!");
pickup_GAmonia[playerid] = 0;
pickup_Amonia[playerid] = 0;
pickup_Coca[playerid] = 0;
pickup_Calcio[playerid] = 0;
pickup_Manual[playerid] = 0;
pickup_Oxido[playerid] = 0;
return 1;
}
if(PlayerInfo[playerid][pEmprego] == 21)
{
if(CP[playerid] == 99 && GetPVarInt(playerid, "AGR_Pegou"))
{
if(pickupid == PickupAGR[0])
{
TotalAGR[0] ++;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[0],Max_AGR);
if(TotalAGR[0] >= Max_AGR){
PagarAGR();
TotalAGR[0]=0;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[0],Max_AGR);
}
Update3DTextLabelText(TextsAGR[0], COLOR_YELLOW, string);
CP[playerid] = 0;
RemovePlayerAttachedObject(playerid, Slot_Planta);
GameTextForPlayer(playerid, "_~n~_~n~_~n~_~n~~w~Semente guardada~n~~g~+R$500", 5000, 5);
GiveDinheiro(playerid, 500);
SetPVarInt(playerid, "AGR_Pegou", 0);
DisablePlayerCheckpoint(playerid);
}
if(pickupid == PickupAGR[1])
{
TotalAGR[1] ++;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[1],Max_AGR);
if(TotalAGR[1] >= Max_AGR){
PagarAGR();
TotalAGR[1]=0;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[1],Max_AGR);
}
Update3DTextLabelText(TextsAGR[1], COLOR_YELLOW, string);
CP[playerid] = 0;
RemovePlayerAttachedObject(playerid, Slot_Planta);
GameTextForPlayer(playerid, "_~n~_~n~_~n~_~n~~w~Semente guardada~n~~g~+R$500", 5000, 5);
GiveDinheiro(playerid, 500);
SetPVarInt(playerid, "AGR_Pegou", 0);
DisablePlayerCheckpoint(playerid);
}
if(pickupid == PickupAGR[2])
{
TotalAGR[2] ++;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[2],Max_AGR);
if(TotalAGR[2] >= Max_AGR){
PagarAGR();
TotalAGR[2]=0;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[2],Max_AGR);
}
Update3DTextLabelText(TextsAGR[2], COLOR_YELLOW, string);
CP[playerid] = 0;
RemovePlayerAttachedObject(playerid, Slot_Planta);
GameTextForPlayer(playerid, "_~n~_~n~_~n~_~n~~w~Semente guardada~n~~g~+R$500", 5000, 5);
GiveDinheiro(playerid, 500);
SetPVarInt(playerid, "AGR_Pegou", 0);
}
if(pickupid == PickupAGR[3])
{
TotalAGR[3] ++;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[3],Max_AGR);
if(TotalAGR[3] >= Max_AGR){
PagarAGR();
TotalAGR[3]=0;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[3],Max_AGR);
}
Update3DTextLabelText(TextsAGR[3], COLOR_YELLOW, string);
CP[playerid] = 0;
RemovePlayerAttachedObject(playerid, Slot_Planta);
GameTextForPlayer(playerid, "_~n~_~n~_~n~_~n~~w~Semente guardada~n~~g~+R$500", 5000, 5);
GiveDinheiro(playerid, 500);
SetPVarInt(playerid, "AGR_Pegou", 0);
}
if(pickupid == PickupAGR[4])
{
TotalAGR[4] ++;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[4],Max_AGR);
if(TotalAGR[4] >= Max_AGR){
PagarAGR();
TotalAGR[4]=0;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[4],Max_AGR);
}
Update3DTextLabelText(TextsAGR[4], COLOR_YELLOW, string);
CP[playerid] = 0;
RemovePlayerAttachedObject(playerid, Slot_Planta);
GameTextForPlayer(playerid, "_~n~_~n~_~n~_~n~~w~Semente guardada~n~~g~+R$500", 5000, 5);
GiveDinheiro(playerid, 500);
SetPVarInt(playerid, "AGR_Pegou", 0);
}
if(pickupid == PickupAGR[5])
{
TotalAGR[5] ++;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[5],Max_AGR);
if(TotalAGR[5] >= Max_AGR){
PagarAGR();
TotalAGR[5]=0;
format(string, sizeof string, "[SEMENTES COLHIDAS]\n(%d/%d)",TotalAGR[5],Max_AGR);
}
Update3DTextLabelText(TextsAGR[5], COLOR_YELLOW, string);
CP[playerid] = 0;
RemovePlayerAttachedObject(playerid, Slot_Planta);
GameTextForPlayer(playerid, "_~n~_~n~_~n~_~n~~w~Semente guardada~n~~g~+R$500", 5000, 5);
GiveDinheiro(playerid, 500);
SetPVarInt(playerid, "AGR_Pegou", 0);
}
}
}
if(pickupid == PickInterior)
{
GameTextForPlayer(playerid, "~b~digite~n~~g~/batercartao~n~~w~OU /equipar", 3000, 3);
}
if(pickupid == LFicha)
{
GameTextForPlayer(playerid, "~b~digite~n~~w~/limparficha", 3000, 3);
}
if(!RoubandoCaixa[playerid])
{
for(new i; i < MAX_CAIXAS; i++)
{
if(!CaixaInfo[i][Caixa_Roubada])continue;
for(new p; p < MAX_PICKUPS_ROUBO; p++)
{
if(pickupid == Pickups_Roubo[i][p])
{
if(IsACop(playerid))
{
GameTextForPlayer(playerid, "~g~USE: /consertarcaixa para conserta-lo!", 1000, 1);
continue;
}
new keys, ud, lr;
GetPlayerKeys(playerid, keys, ud, lr);
if(keys & KEY_CROUCH)
{
GranaRoubo(playerid, i);
DestroyPickup(pickupid);
Pickups_Roubo[i][p] = -1;
}
else
{
GameTextForPlayer(playerid, "~b~~h~Segure |~w~C~b~~h~| para roubar o ~b~~h~dinheiro", 1000, 1);
}
}
}
}
}
return true;
}