27.01.2010, 15:44
Hey there everybody, i got a little problem here...
I am busy creating my own RP from scratchs, and i got a little problem with the factions...
The problem is that when someone pickups up the faciton-base-door-pickup basicly there just doesn't happen much...
Here's my code:
I tried quite much now, and still i can't find the problem...
Anyone got a suggestion?
I am busy creating my own RP from scratchs, and i got a little problem with the factions...
The problem is that when someone pickups up the faciton-base-door-pickup basicly there just doesn't happen much...
Here's my code:
Код:
#define FACTIONS 3 OnGameModeInit() { print(" "); for(new i=1; i<=FACTIONS; i++) { new Float:X, Float:Y, Float:Z, Float:A, id, col1, col2, istring[128]; format(istring, sizeof(istring), "/factions/%i", i); X = dini_Float(istring, "baseX"); Y = dini_Float(istring, "baseY"); Z = dini_Float(istring, "baseZ"); gFactionPickup[i] = AddStaticPickup(1239,19,X,Y,Z); X = dini_Float(istring, "IntX"); Y = dini_Float(istring, "IntY"); Z = dini_Float(istring, "IntZ"); gFIntPickup[i] = AddStaticPickup(1239, 19, X, Y+1, Z); id = dini_Int(istring, "carid"); col1 = dini_Int(istring, "carcolor1"); col2 = dini_Int(istring, "carcolor2"); X = dini_Float(istring, "car1X"); Y = dini_Float(istring, "car1Y"); Z = dini_Float(istring, "car1Z"); A = dini_Float(istring, "car1A"); AddStaticVehicle(id, X, Y, Z, A, col1, col2); X = dini_Float(istring, "car2X"); Y = dini_Float(istring, "car2Y"); Z = dini_Float(istring, "car2Z"); A = dini_Float(istring, "car2A"); AddStaticVehicle(id, X, Y, Z, A, col1, col2); X = dini_Float(istring, "car3X"); Y = dini_Float(istring, "car3Y"); Z = dini_Float(istring, "car3Z"); A = dini_Float(istring, "car3A"); AddStaticVehicle(id, X, Y, Z, A, col1, col2); printf("Faction %i loaded!", i); } print("__________________"); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { for(new i=0; i<FACTIONS; i++) { if(gFactionPickup[i] == pickupid) { new Fname[256], IntID, Float:IntX, Float:IntY, Float:IntZ, istring[128], message[128]; format(istring, sizeof(istring), "/factions/%i", i); Fname = dini_Get(istring, "name"); IntID = dini_Int(istring, "intid"); IntX = dini_Float(istring, "IntX"); IntY = dini_Float(istring, "IntY"); IntZ = dini_Float(istring, "IntZ"); format(message, sizeof(message), "%s Base", Fname); GameTextForPlayer(playerid, message, 2000, 0); SetPlayerPos(playerid, IntX, IntY, IntZ); SetPlayerInterior(playerid, IntID); } } }
Anyone got a suggestion?