30.06.2013, 11:25
Ah I see what you are trying to do there,
You need to make the 'idx' variable global, basically what you were doing there that you made a loop, to create x amount of doors at the same position. I don't see why you needed the loop there
Код:
new idx; // Somewhere on top of your script CMD:cdoor(playerid,params[]) { new string[200]; GetPlayerPos(playerid, DoorInfo[idx][dXe], DoorInfo[idx][dYe], DoorInfo[idx][dZe]); DoorInfo[idx][dIe] = GetPlayerInterior(playerid); DoorInfo[idx][dVe] = GetPlayerVirtualWorld(playerid); GetPlayerFacingAngle(playerid, DoorInfo[idx][dAi]); // Creating the door CreateDynamicPickup(19198, 1, DoorInfo[idx][dXe], DoorInfo[idx][dYe], DoorInfo[idx][dZe]+0.3, DoorInfo[idx][dVe], DoorInfo[idx][dIe]); format(string, sizeof(string), "ID: %d",idx); CreateDynamic3DTextLabel(string,-1, DoorInfo[idx][dXe]-0.1, DoorInfo[idx][dYe], DoorInfo[idx][dZe]+0.5, 15); idx ++; return 1; }