31.01.2010, 14:44
Could be true what MaVe mentioned. Try altering your code to:
(( Just "<=" changed to "<" ))
Try that out!
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { for(new i; i < FACTIONS; i++) { if(pickupid == gFPickup[i]) //if the pickup is the one from the faction base { new string[256], fname[128]; format(fname, sizeof(fname), "/factions/%i", i); string = dini_Get(fname, "name"); format(string, sizeof(string), "%s base", string); GameTextForPlayer(playerid, string, 2000, 0); SetPlayerPos(playerid, dini_Float(fname, "intX"), dini_Float(fname, "intY")+5, dini_Float(fname, "intZ")); SetPlayerInterior(playerid, dini_Int(fname, "intid")); } else continue; //if not, continue the loop } for(new j; j < FACTIONS; j++) { if(pickupid == gFIntPickup[j]) { SendClientMessage(playerid, COLOR_BLUE, "Aren't you outside yet?!"); new fname[128]; format(fname, sizeof(fname), "/factions/%i", j); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, dini_Float(fname, "X"), dini_Float(fname, "Y"), dini_Float(fname, "Z")); } else continue; } return 1; }
Try that out!