new Float: posMaconhaKTR[50][3] = {
{-1138.9778, -1102.2078, 129.2188},
{-1138.9778, -1099.2662, 129.2188},
{-1138.9778, -1095.4869, 129.2188},
{-1138.9778, -1092.7000, 129.2188},
{-1138.9778, -1089.8979, 129.2188},
{-1138.9778, -1086.5125, 129.2188},
{-1138.9778, -1084.0181, 129.2188},
{-1138.9778, -1080.4701, 129.2188},
{-1138.9778, -1077.9160, 129.2188},
{-1138.9778, -1074.5339, 129.2188},
{-1144.7415, -1073.3607, 129.2188},
{-1144.7415, -1076.0214, 129.2188},
{-1144.7415, -1079.5002, 129.2188},
{-1144.7415, -1082.5570, 129.2188},
{-1144.7415, -1085.2073, 129.2188},
{-1144.7415, -1088.1097, 129.2188},
{-1144.7415, -1091.4097, 129.2188},
{-1144.7415, -1094.9536, 129.2188},
{-1144.7415, -1097.3158, 129.2188},
{-1144.7415, -1100.7734, 129.2188},
{-1151.2426, -1101.9478, 129.2188},
{-1151.2426, -1099.2852, 129.2188},
{-1151.2426, -1096.6824, 129.2188},
{-1151.2426, -1093.5868, 129.2188},
{-1151.2426, -1090.2744, 129.2188},
{-1151.2426, -1086.7968, 129.2188},
{-1151.2426, -1084.9172, 129.2188},
{-1151.2426, -1081.3206, 129.2188},
{-1151.2426, -1078.5323, 129.2188},
{-1151.2426, -1075.2753, 129.2188},
{-1156.8798, -1073.3842, 129.2188},
{-1156.8798, -1075.8533, 129.2188},
{-1156.8798, -1079.0486, 129.2188},
{-1156.8798, -1081.8853, 129.2188},
{-1156.8798, -1085.5366, 129.2188},
{-1156.8798, -1087.7908, 129.2188},
{-1156.8798, -1091.0292, 129.2188},
{-1156.8798, -1094.1638, 129.2188},
{-1156.8798, -1097.4391, 129.2188},
{-1156.8798, -1100.7993, 129.2188},
{-1163.3335, -1101.7939, 129.2188},
{-1163.3335, -1099.4950, 129.2188},
{-1163.3335, -1097.0344, 129.2188},
{-1163.3335, -1093.8239, 129.2188},
{-1163.3335, -1090.0579, 129.2188},
{-1163.3335, -1087.6022, 129.2188},
{-1163.3335, -1084.2627, 129.2188},
{-1163.3335, -1080.9056, 129.2188},
{-1163.3335, -1078.2262, 129.2188},
{-1163.3335, -1075.2267, 129.2188}
};
CMD:plantar(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -1134.2456, -1105.5052, 129.2188))
{
if(Player[playerid][pFaccao] == 1)
{
for(new i = 1; i < 50; i++)
{
pMaconhaKTR[i] = CreateDynamicPickup(19134, 1, posMaconhaKTR[i][0], posMaconhaKTR[i][1], posMaconhaKTR[i][2], -1, -1, playerid);
}
}
else { SCM(playerid, INFOA, "Vocк nгo faz parte da facзгo dona desta fazenda !"); }
}
else { SCM(playerid, INFOA, "Vocк nгo estб em uma plantaзгo de maconha !"); }
return true;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(Player[playerid][pFaccao] == 1)
{
DestroyPickup(pMaconhaKTR[pickupid-1]);
ApplyAnimation(playerid,"BOMBER","BOM_Plant_Loop",2.0,0,0,0,0,0);
CreateObject(19473, posMaconhaKTR[pickupid][0], posMaconhaKTR[pickupid][1], posMaconhaKTR[pickupid][2]-1, 0, 0, 0, 150.0);
}
return 1;
}
DestroyPickup(pMaconhaKTR[pickupid-1]);
DestroyPickup(pMaconhaKTR[pickupid-1]); |
PHP код:
entгo se nesse linha: o pickup for o id 1 oque vai acontecer e que ele vai pegar a posicao pickupid(1)-1 que sera a 0. que nгo contem nada la. |
for(new i = 1; i < 50; i++)
for(new i = 0; i < 50; i++)