26.07.2014, 00:47
Somehow, this crashes my server. Was hoping one of you know what I did wrong. I'm known to completely miss the small things xD
All the functions in this thing work properly, except for the last one, which is why I've really got no clue what's going on here, also, I've never had this problem before so I haven't learned how to handle it O.O
pawn Код:
factionsOnPlayerPickupPickup(playerid, pickupid) {
if(pickupid == pdmetaldetector) {
if(!IsAnLEO(playerid)) {
new s=2,w,a;
while(s <= 8) {
GetPlayerWeaponData(playerid, s, w, a);
if(w > 0 && a != 0) {
foreach(Player, i) {
if(GetPlayerInterior(i) == 10 && IsPlayerInRangeOfPoint(i, 40.0, 246.36, 107.58, 1003.21)) {
SendClientMessage(i, X11_TOMATO_2, " ");
SendClientMessage(playerid, X11_TOMATO_2, "* The metal detector beeps! *");
}
return 1;
}
s++;
}
}
}
return 1;
}
return 0;
}
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid) {
businessPickupPickup(playerid, pickupid);
jobsOnPickupPickup(playerid, pickupid);
VIPOnPickupPickup(playerid, pickupid);
RPOnPlayerPickupPickup(playerid, pickupid);
accessoriesOnPlayerPickupPickup(playerid, pickupid);
govOnPlayerPickupPickup(playerid, pickupid);
factionsOnPlayerPickupPickup(playerid, pickupid);
return 1;
}